Drag[en]gine Script Module DragonScript
1.23
|
Interface for behaviors supporting preinitialization. More...
Public Member Functions | |
void | prepareStub (StubElement stub, GameWorld gameWorld, bool loading) |
Prepare stub. More... | |
Interface for behaviors supporting preinitialization.
Preinitializing allows behaviors to modify StubElement before Element.init() is called. This can be used to alter the behavior initialization procss my modifying the stub properties or textures.
Usually preinitializing is done for elements to be added to a game world. It is thus possible to use game world stub properties to alter the initialization. This can be used to adjust the behavior depending on what game world they are created for. It is also possible preinitialization is done without the element to be added to a specific game world. In this case gameWorld is null. Behaviors added for preinitializing have to be able to handle gameWorld being null.
void Dragengine.Scenery.BehaviorPrepareStub.prepareStub | ( | StubElement | stub, |
GameWorld | gameWorld, | ||
bool | loading | ||
) |
Prepare stub.
Called by BehaviorElementClass.createAndAddElement(StubElement,GameWorld) with loading set to false and BehaviorElementClass.loadAndAddElement(PersistencyEnvironment,StubElement,FileReader,GameWorld) with loading set to true.
Implemented in Dragengine.Scenery.ECBehaviorRandomizeGeometry.