Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECBehaviorStateMachine.Instance Class Reference

Behavior instance. More...

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

Public Member Functions

void dispose ()
 Dispose of composeable instance. More...
 
SMContext getContext ()
 Context or null if state machine is null. More...
 
ECBehaviorStateMachine getECBehavior ()
 Behavior. More...
 
StateMachine getStateMachine ()
 State machine or null if not loaded. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
Instance new (ECBehaviorStateMachine ecbehavior, BehaviorElement element)
 Create element. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read element from file. More...
 
void runEvent (String event)
 Run event on state machine. More...
 
void setAction (String name, Block actionBlock)
 Set action to state machine using block. More...
 
void setAction (String name, SMAction action)
 Set action to state machine. More...
 
void setCondition (String name, Block conditionBlock)
 Set condition to state machine using block. More...
 
void setCondition (String name, SMCondition condition)
 Set condition to state machine. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write element to file. More...
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world. More...
 
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor. More...
 
void enterFrame ()
 Frame update started. More...
 
void geometryChanged ()
 Position or orientation changed. More...
 
BehaviorElement getElement ()
 Behavior element to apply behavior to. More...
 
int getInstanceIndex ()
 Behavior instance index. More...
 
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance. More...
 
void postThink (float elapsed)
 Post thinking after physics processing is finished. More...
 
void removeFromGameWorld ()
 Remove element from game world. More...
 
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called. More...
 
bool requiresThink ()
 Behavior instance requires think() to be called. More...
 
void stateChanged ()
 State changed (visble, touchable). More...
 
void think (float elapsed)
 Think about what to do for the next frame update. More...
 

Protected Member Functions

SMContext createContext (StubElement stub, StateMachine stateMachine)
 Create context. More...
 
StateMachine loadStateMachine (StubElement stub)
 Load state machine. More...
 
void reset ()
 Reset state machine to initial state. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called. More...
 
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called. More...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ createContext()

SMContext Dragengine.Scenery.ECBehaviorStateMachine.Instance.createContext ( StubElement  stub,
StateMachine  stateMachine 
)
protected

Create context.

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getContext()

SMContext Dragengine.Scenery.ECBehaviorStateMachine.Instance.getContext ( )

Context or null if state machine is null.

◆ getECBehavior()

ECBehaviorStateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.getECBehavior ( )

Behavior.

◆ getStateMachine()

StateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.getStateMachine ( )

State machine or null if not loaded.

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ loadStateMachine()

StateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.loadStateMachine ( StubElement  stub)
protected

Load state machine.

◆ new()

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

Create element.

◆ readFromFile()

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)

Read element from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ reset()

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.reset ( )
protected

Reset state machine to initial state.

Does nothing if no context is present.

◆ runEvent()

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.runEvent ( String  event)

Run event on state machine.

Does nothing if no context is present.

◆ setAction() [1/2]

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setAction ( String  name,
Block  actionBlock 
)

Set action to state machine using block.

Block receives arguments SMContext context and Dictionary parameters.

Does nothing if no context is present.

◆ setAction() [2/2]

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setAction ( String  name,
SMAction  action 
)

Set action to state machine.

Does nothing if no context is present.

◆ setCondition() [1/2]

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setCondition ( String  name,
Block  conditionBlock 
)

Set condition to state machine using block.

Block receives arguments SMContext context and Dictionary parameters and returns bool.

Does nothing if no context is present.

◆ setCondition() [2/2]

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setCondition ( String  name,
SMCondition  condition 
)

Set condition to state machine.

Does nothing if no context is present.

◆ writeToFile()

void Dragengine.Scenery.ECBehaviorStateMachine.Instance.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write element to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.


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