Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
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... | |
Behavior instance.
|
protected |
Create context.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
SMContext Dragengine.Scenery.ECBehaviorStateMachine.Instance.getContext | ( | ) |
Context or null if state machine is null.
ECBehaviorStateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.getECBehavior | ( | ) |
Behavior.
StateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.getStateMachine | ( | ) |
State machine or null if not loaded.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Load state machine.
Instance Dragengine.Scenery.ECBehaviorStateMachine.Instance.new | ( | ECBehaviorStateMachine | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read element from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Reset state machine to initial state.
Does nothing if no context is present.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.runEvent | ( | String | event | ) |
Run event on state machine.
Does nothing if no context is present.
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.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setAction | ( | String | name, |
SMAction | action | ||
) |
Set action to state machine.
Does nothing if no context is present.
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.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setCondition | ( | String | name, |
SMCondition | condition | ||
) |
Set condition to state machine.
Does nothing if no context is present.
void Dragengine.Scenery.ECBehaviorStateMachine.Instance.writeToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write element to file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.