|
Drag[en]gine Script Module DragonScript 1.32.1
|
Behavior instance. More...
Public Member Functions | |
| void | addToGameWorld () |
| Add element to game world. | |
| void | dispose () |
| Dispose of composeable instance. | |
| void | enterFrame () |
| Frame update started. | |
| SMContext | getContext () |
| Context. | |
| ECBehaviorStateMachine | getECBehavior () |
| Behavior. | |
| StateMachine | getStateMachine () |
| State machine or null if not loaded. | |
| void | init (StubElement stub) |
| Initialize element from stub. | |
| Instance | new (ECBehaviorStateMachine ecbehavior, BehaviorElement element) |
| Create element. | |
| void | postInit (StubElement stub) |
| Post initialize. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read element from file. | |
| void | removeFromGameWorld () |
| Remove element from game world. | |
| void | runEvent (String event) |
| Run event on state machine. | |
| void | setAction (String name, Block actionBlock) |
| Set action to state machine using block. | |
| void | setAction (String name, SMAction action) |
| Set action to state machine. | |
| void | setCondition (String name, Block conditionBlock) |
| Set condition to state machine using block. | |
| void | setCondition (String name, SMCondition condition) |
| Set condition to state machine. | |
| void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
| Write element to file. | |
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. | |
| 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. | |
Public Attributes | |
| SMContext | pContext |
| ECBehaviorStateMachine | pECBehavior |
| StateMachine | pStateMachine |
Public Attributes inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
| BehaviorElement | pElement |
| int | pInstanceIndex |
| bool | pRequiresEnterFrame |
| bool | pRequiresThink |
Protected Member Functions | |
| SMContext | createContext (StubElement stub, StateMachine stateMachine) |
| Create context. | |
| StateMachine | loadStateMachine (StubElement stub) |
| Load state machine. | |
| void | reset () |
| Reset state machine to initial state. | |
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. | |
Behavior instance.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.addToGameWorld | ( | ) |
Add element to game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Create context.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.enterFrame | ( | ) |
Frame update started.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| SMContext Dragengine.Scenery.ECBehaviorStateMachine.Instance.getContext | ( | ) |
Context.
| 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.postInit | ( | StubElement | stub | ) |
Post initialize.
Called by BehaviorElement::init() for all behaviors registered using BehaviorElement::registerPostInit().
Implements Dragengine.Scenery.BehaviorPostInit.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.readFromFile | ( | PersistencyEnvironment | env, |
| FileReader | reader | ||
| ) |
Read element from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
|
protected |
Reset state machine to initial state.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.runEvent | ( | String | event | ) |
Run event on state machine.
| 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.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setAction | ( | String | name, |
| SMAction | action | ||
| ) |
Set action to state machine.
| 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.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.setCondition | ( | String | name, |
| SMCondition | condition | ||
| ) |
Set condition to state machine.
| void Dragengine.Scenery.ECBehaviorStateMachine.Instance.writeToFile | ( | PersistencyEnvironment | env, |
| FileWriter | writer | ||
| ) |
Write element to file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| SMContext Dragengine.Scenery.ECBehaviorStateMachine.Instance.pContext |
| ECBehaviorStateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.pECBehavior |
| StateMachine Dragengine.Scenery.ECBehaviorStateMachine.Instance.pStateMachine |