Drag[en]gine Script Module DragonScript 1.32.1
Loading...
Searching...
No Matches
Dragengine.Scenery.ECBehaviorInventory.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorInventory.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void add (ECBehaviorStashable.Instance stashable)
 Add stashable to inventory.
 
void addListener (Listener listener)
 Add listener.
 
void addListenerFactory (Block blockFactory)
 Add listener factory using block.
 
void addListenerFactory (ListenerFactory factory)
 Add listener factory.
 
void addToGameWorld ()
 Add element to game world.
 
bool canAdd (ECBehaviorStashable.Instance stashable)
 Stashable can be added to this inventory.
 
Array collect (Block ablock)
 Collect stashables with block.
 
void createListeners (Instance instance)
 Create listeners from factories adding them to behavior instance.
 
void dispose ()
 Dispose of composeable instance.
 
void dispose ()
 Dispose of behavior.
 
void enterFrame ()
 Frame update started.
 
ECBehaviorStashable.Instance find (Block ablock)
 Find stashables with block.
 
void forEach (Block ablock)
 Visit stashables with block.
 
void forEachListenerFactory (Block ablock)
 Visit listener factories with block with argument ListenerFactory.
 
ECBehaviorStashable.Instance getAt (int index)
 Stashable at index.
 
ECComposeBTSM getBTSMs ()
 Compose behavior trees and state machines.
 
int getCount ()
 Count of stashables.
 
ECBehaviorInventory getECBehavior ()
 Behavior.
 
ElementResolver getElementResolver ()
 Element resolver used during loading or null if not set.
 
String getPrefix ()
 Prefix.
 
bool has (ECBehaviorStashable.Instance stashable)
 Stashable is present.
 
void init (StubElement stub)
 Initialize element from stub.
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class.
 
bool isEmpty ()
 Inventory is empty.
 
bool isNotEmpty ()
 Inventory is not empty.
 
Instance new (BehaviorElementClass eclass)
 Create behavior element class.
 
Instance new (BehaviorElementClass eclass, String id)
 Create behavior element class.
 
Instance new (BehaviorElementClass eclass, String id, String prefix)
 
Instance new (ECBehaviorInventory ecbehavior, BehaviorElement element)
 Create element.
 
void removeListener (Listener listener)
 Remove listener.
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor.
 
void geometryChanged ()
 Position or orientation changed.
 
BehaviorElement getElement ()
 Behavior element to apply behavior to.
 
int getInstanceIndex ()
 Behavior instance index.
 
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance.
 
void postThink (float elapsed)
 Post thinking after physics processing is finished.
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file.
 
void removeFromGameWorld ()
 Remove element from game world.
 
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called.
 
bool requiresThink ()
 Behavior instance requires think() to be called.
 
void stateChanged ()
 State changed (visble, touchable).
 
void think (float elapsed)
 Think about what to do for the next frame update.
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file.
 

Public Attributes

ECComposeBTSM.Instance pBTSMs
 
ECComposeBTSM pBTSMs
 
ECBehaviorInventory pECBehavior
 
ElementResolver pElementResolver
 
Array pListenerFactories
 
Array pListeners
 
String pPrefix
 
ECBehaviorStashable.Instance pStashable
 
Array pStashables
 
- Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance
BehaviorElement pElement
 
int pInstanceIndex
 
bool pRequiresEnterFrame
 
bool pRequiresThink
 

Additional Inherited Members

- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called.
 
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called.
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ add()

void Dragengine.Scenery.ECBehaviorInventory.Instance.add ( ECBehaviorStashable.Instance  stashable)

Add stashable to inventory.

Exceptions
EInvalidParamstashable is null.
EInvalidParamstashable is already in another inventory.

◆ addListener()

void Dragengine.Scenery.ECBehaviorInventory.Instance.addListener ( Listener  listener)

Add listener.

◆ addListenerFactory() [1/2]

void Dragengine.Scenery.ECBehaviorInventory.Instance.addListenerFactory ( Block  blockFactory)

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

void Dragengine.Scenery.ECBehaviorInventory.Instance.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ addToGameWorld()

void Dragengine.Scenery.ECBehaviorInventory.Instance.addToGameWorld ( )

Add element to game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ canAdd()

bool Dragengine.Scenery.ECBehaviorInventory.Instance.canAdd ( ECBehaviorStashable.Instance  stashable)

Stashable can be added to this inventory.

Return values
falseStashable is already in another inventory.
trueAdding is possible

◆ collect()

Array Dragengine.Scenery.ECBehaviorInventory.Instance.collect ( Block  ablock)

Collect stashables with block.

Block receives as only argument ECBehaviorStashable.Instance stashable and has to return true to include the stashable in the returned Array of ECBehaviorStashable.Instance .

◆ createListeners()

void Dragengine.Scenery.ECBehaviorInventory.Instance.createListeners ( Instance  instance)

Create listeners from factories adding them to behavior instance.

◆ dispose() [1/2]

void Dragengine.Scenery.ECBehaviorInventory.Instance.dispose ( )

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ dispose() [2/2]

void Dragengine.Scenery.ECBehaviorInventory.Instance.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ enterFrame()

void Dragengine.Scenery.ECBehaviorInventory.Instance.enterFrame ( )

Frame update started.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ find()

ECBehaviorStashable.Instance Dragengine.Scenery.ECBehaviorInventory.Instance.find ( Block  ablock)

Find stashables with block.

Block receives as only argument ECBehaviorStashable.Instance stashable and has to return true if the matching stashable is found.

◆ forEach()

void Dragengine.Scenery.ECBehaviorInventory.Instance.forEach ( Block  ablock)

Visit stashables with block.

Block receives as only argument ECBehaviorStashable.Instance stashable.

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorInventory.Instance.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ getAt()

ECBehaviorStashable.Instance Dragengine.Scenery.ECBehaviorInventory.Instance.getAt ( int  index)

Stashable at index.

◆ getBTSMs()

ECComposeBTSM Dragengine.Scenery.ECBehaviorInventory.Instance.getBTSMs ( )

Compose behavior trees and state machines.

Version
1.26

◆ getCount()

int Dragengine.Scenery.ECBehaviorInventory.Instance.getCount ( )

Count of stashables.

◆ getECBehavior()

ECBehaviorInventory Dragengine.Scenery.ECBehaviorInventory.Instance.getECBehavior ( )

Behavior.

◆ getElementResolver()

ElementResolver Dragengine.Scenery.ECBehaviorInventory.Instance.getElementResolver ( )

Element resolver used during loading or null if not set.

◆ getPrefix()

String Dragengine.Scenery.ECBehaviorInventory.Instance.getPrefix ( )

Prefix.

Version
1.26

◆ has()

bool Dragengine.Scenery.ECBehaviorInventory.Instance.has ( ECBehaviorStashable.Instance  stashable)

Stashable is present.

◆ init()

void Dragengine.Scenery.ECBehaviorInventory.Instance.init ( StubElement  stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ instance()

Instance Dragengine.Scenery.ECBehaviorInventory.Instance.instance ( BehaviorElement  element)

Get instance in element from owner element class.

◆ isEmpty()

bool Dragengine.Scenery.ECBehaviorInventory.Instance.isEmpty ( )

Inventory is empty.

◆ isNotEmpty()

bool Dragengine.Scenery.ECBehaviorInventory.Instance.isNotEmpty ( )

Inventory is not empty.

◆ new() [1/4]

Instance Dragengine.Scenery.ECBehaviorInventory.Instance.new ( BehaviorElementClass  eclass)

Create behavior element class.

◆ new() [2/4]

Instance Dragengine.Scenery.ECBehaviorInventory.Instance.new ( BehaviorElementClass  eclass,
String  id 
)

Create behavior element class.

◆ new() [3/4]

Instance Dragengine.Scenery.ECBehaviorInventory.Instance.new ( BehaviorElementClass  eclass,
String  id,
String  prefix 
)

◆ new() [4/4]

Instance Dragengine.Scenery.ECBehaviorInventory.Instance.new ( ECBehaviorInventory  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorInventory.Instance.removeListener ( Listener  listener)

Remove listener.

Member Data Documentation

◆ pBTSMs [1/2]

ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorInventory.Instance.pBTSMs

◆ pBTSMs [2/2]

ECComposeBTSM Dragengine.Scenery.ECBehaviorInventory.Instance.pBTSMs

◆ pECBehavior

ECBehaviorInventory Dragengine.Scenery.ECBehaviorInventory.Instance.pECBehavior

◆ pElementResolver

ElementResolver Dragengine.Scenery.ECBehaviorInventory.Instance.pElementResolver

◆ pListenerFactories

Array Dragengine.Scenery.ECBehaviorInventory.Instance.pListenerFactories

◆ pListeners

Array Dragengine.Scenery.ECBehaviorInventory.Instance.pListeners

◆ pPrefix

String Dragengine.Scenery.ECBehaviorInventory.Instance.pPrefix

◆ pStashable

ECBehaviorStashable.Instance Dragengine.Scenery.ECBehaviorInventory.Instance.pStashable

◆ pStashables

Array Dragengine.Scenery.ECBehaviorInventory.Instance.pStashables

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