Drag[en]gine Script Module DragonScript
1.23
|
Interface for behaviors supporting preventing element creation. More...
Public Member Functions | |
bool | preventCreation (StubElement stub, GameWorld gameWorld) |
Prevent creation of element. More... | |
Interface for behaviors supporting preventing element creation.
Preventing creation allows behaviors to cancel creating and adding an element before Element.init() is called. This can be used for to randomly create or not create an element as well as creating elements only if the player choose a certain difficulty level.
Prevent creation is tested after BehaviorPrepareStub interfaces are processed.
bool Dragengine.Scenery.BehaviorPreventCreation.preventCreation | ( | StubElement | stub, |
GameWorld | gameWorld | ||
) |
Prevent creation of element.
Called by BehaviorElementClass.createAndAddElement(StubElement,GameWorld) after BehaviorPrepareStub interfaces have been processed. If true is returned the element is not created and added to the game world.
Implemented in Dragengine.Scenery.ECBehaviorRandomizeCreation.