Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.BehaviorPreventCreation Interface Reference

Interface for behaviors supporting preventing element creation. More...

Inheritance diagram for Dragengine.Scenery.BehaviorPreventCreation:
Dragengine.Scenery.ECBehaviorRandomizeCreation

Public Member Functions

bool preventCreation (StubElement stub, GameWorld gameWorld)
 Prevent creation of element. More...
 

Detailed Description

Interface for behaviors supporting preventing element creation.

Version
1.23

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.

Member Function Documentation

◆ preventCreation()

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.


The documentation for this interface was generated from the following file: