|
Drag[en]gine Script Module DragonScript 1.35
|
Default implementation of GWBehaviorFactory. More...
Public Member Functions | |
| void | assertIdEmpty (String id) |
| Assert id is empty string. | |
| String | factoryId () |
| Unique identifier of factory. | |
| BehaviorFactoryHelper | getHelper () |
| Helper to use. | |
| DefaultGWBehaviorFactory | new (String id) |
| void | setHelper (BehaviorFactoryHelper helper) |
| Set helper to use. | |
| Public Member Functions inherited from Dragengine.Scenery.GWBehaviorFactory | |
| GWBehavior | addBehavior (GameWorld gameWorld, String id) |
| Add behavior to game world. | |
Public Attributes | |
| String | pFactoryId |
| BehaviorFactoryHelper | pHelper |
Default implementation of GWBehaviorFactory.
This class provides a couple of helper methods to use BehaviorFactoryHelper in a portable way. For this the helper assigned to BehaviorElementClass.sharedFactoryHelper is stored during construction time. This allows scripts to assign different factory helpers for loading different parts of the application their own way.
Subclass must implement GWBehaviorFactory.addBehavior().
| void Dragengine.Scenery.DefaultGWBehaviorFactory.assertIdEmpty | ( | String | id | ) |
Assert id is empty string.
| EInvalidParam | if id is not empty string. |
References assertIdEmpty(), new(), pHelper, and setHelper().
Referenced by assertIdEmpty().
| String Dragengine.Scenery.DefaultGWBehaviorFactory.factoryId | ( | ) |
Unique identifier of factory.
Should be the class name of the behavior. Factory identifiers are case sensitive.
Implements Dragengine.Scenery.GWBehaviorFactory.
Referenced by getHelper().
| BehaviorFactoryHelper Dragengine.Scenery.DefaultGWBehaviorFactory.getHelper | ( | ) |
| DefaultGWBehaviorFactory Dragengine.Scenery.DefaultGWBehaviorFactory.new | ( | String | id | ) |
References new(), pFactoryId, and pHelper.
Referenced by assertIdEmpty(), and new().
| void Dragengine.Scenery.DefaultGWBehaviorFactory.setHelper | ( | BehaviorFactoryHelper | helper | ) |
| String Dragengine.Scenery.DefaultGWBehaviorFactory.pFactoryId |
Referenced by getHelper(), and new().
| BehaviorFactoryHelper Dragengine.Scenery.DefaultGWBehaviorFactory.pHelper |
Referenced by assertIdEmpty(), new(), and setHelper().