|
Drag[en]gine Script Module DragonScript 1.35
|
GameWorld Behavior adding support for behavior tree and state machine access. More...
Public Member Functions | |
| void | dispose () |
| Dispose of behavior. | |
| void | forEachBTAction (Block ablock) |
| Visit behavior tree actions using block with parameters String name and BTAction action. | |
| void | forEachBTCondition (Block ablock) |
| Visit behavior tree conditions using block with parameters String name and BTCondition condition. | |
| void | forEachSMAction (Block ablock) |
| Visit state machine actions using block with parameters String name and SMAction action. | |
| void | forEachSMCondition (Block ablock) |
| Visit state machine conditions using block with parameters String name and SMCondition condition. | |
| BTAction | getBTAction (String name) |
| Behavior tree action for name or null if absent. | |
| int | getBTActionCount () |
| Count of behavior tree actions. | |
| BTCondition | getBTCondition (String name) |
| Behavior tree condition for name or null if absent. | |
| int | getBTConditionCount () |
| Count of behavior tree conditions. | |
| SMAction | getSMAction (String name) |
| State machine action for name or null if absent. | |
| int | getSMActionCount () |
| Count of state machine actions. | |
| SMCondition | getSMCondition (String name) |
| State machine condition for name or null if absent. | |
| int | getSMConditionCount () |
| Count of state machine conditions. | |
| bool | hasBTAction (String name) |
| Behavior tree action is present. | |
| bool | hasBTCondition (String name) |
| Behavior tree condition is present. | |
| bool | hasSMAction (String name) |
| State machine action is present. | |
| bool | hasSMCondition (String name) |
| State machine condition is present. | |
| void | init (StubGameWorld stub) |
| Initialize game world from stub. | |
| GWBehaviorBTSM | new (GameWorld gameWorld) |
| Create element. | |
| void | registerReceiveEvents (ECBehaviorStateMachine.Instance stateMachine) |
| Register state machine to receive events. | |
| void | removeAllBTActions () |
| Remove all behavior tree actions. | |
| void | removeAllBTConditions () |
| Remove all behavior tree conditions. | |
| void | removeAllSMActions () |
| Remove all state machine actions. | |
| void | removeAllSMConditions () |
| Remove all state machine conditions. | |
| void | removeBTAction (String name) |
| Remove behavior tree action. | |
| void | removeBTCondition (String name) |
| Remove behavior tree condition. | |
| void | removeSMAction (String name) |
| Remove state machine action. | |
| void | removeSMCondition (String name) |
| Remove state machine condition. | |
| void | runSMEvent (String event) |
| Run event on registered state machines. | |
| void | setAction (String name, BTSMActionCondition action) |
| Set state machine and behavior tree action. | |
| void | setActionCondition (String name, BTSMActionCondition actionCondition) |
| Set state machine and behavior tree action and condition. | |
| void | setBTAction (String name, Block action) |
| Set behavior tree action for name using block. | |
| void | setBTAction (String name, BTAction action) |
| Set behavior tree action for name. | |
| void | setBTCondition (String name, Block condition) |
| Set behavior tree condition for name using block. | |
| void | setBTCondition (String name, BTCondition condition) |
| Set behavior tree condition for name. | |
| void | setCondition (String name, BTSMActionCondition condition) |
| Set state machine and behavior tree condition. | |
| void | setSMAction (String name, Block action) |
| Set state machine action for name using block. | |
| void | setSMAction (String name, SMAction action) |
| Set state machine action for name. | |
| void | setSMCondition (String name, Block condition) |
| Set state machine condition for name using block. | |
| void | setSMCondition (String name, SMCondition condition) |
| Set state machine condition for name. | |
| void | unregisterReceiveEvents (ECBehaviorStateMachine.Instance stateMachine) |
| Unregister state machine from receiving events. | |
| Public Member Functions inherited from Dragengine.Scenery.DefaultGWBehavior | |
| String | getBehaviorID () |
| Unique identifier of behavior. | |
| GameWorld | getGameWorld () |
| Game world this behavior belongs to. | |
| String | getID () |
| Identifier. | |
| void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader) |
| Load data of another behavior. | |
| DefaultGWBehavior | new (GameWorld gameWorld, String id) |
| Create default behavior. | |
| void | postThink (float elapsed) |
| Post thinking after physics processing is finished. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read from file. | |
| bool | requiresPersistency () |
| Behavior requires readFromFile() and writeToFile() to be called. | |
| bool | requiresThink () |
| Behavior instance requires update(), think() and postThink() to be called. | |
| bool | supportsBehaviorID (String identifier) |
| Behavior supports loading data of another behavior. | |
| void | think (float elapsed) |
| Think about what to do for the next frame update. | |
| void | update (float elapsed) |
| Frame update. | |
| void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
| Write to file. | |
Public Attributes | |
| Dictionary | pBTActions |
| SafeArray | pReceiveEventsSMs |
Additional Inherited Members | |
| Protected Member Functions inherited from Dragengine.Scenery.DefaultGWBehavior | |
| void | setBehaviorID (String identifier) |
| Set behavior identifier. | |
| void | setRequiresPersistency (bool required) |
| Set if behavior requires readFromFile() and writeToFile() to be called. | |
| void | setRequiresThink (bool required) |
| Set if behavior instance requires update(), think() and postThink() to be called. | |
| void | useClassNameAsBehaviorID () |
| Set behavior identifier to "<class-name>:<identifier>". | |
| void | useFullyQualifiedClassNameAsBehaviorID () |
| Set behavior identifier to "<fully-qualified-class-name>:<identifier>". | |
GameWorld Behavior adding support for behavior tree and state machine access.
Allows gameworld behaviors to add behavior tree and state machine actions and conditions that can be used by behavior trees and state machines of behavior elements.
This behavior can be present only once in a GameWorld.
| void Dragengine.Scenery.GWBehaviorBTSM.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultGWBehavior.
References pBTActions, and pReceiveEventsSMs.
Referenced by getBTCondition(), and setActionCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.forEachBTAction | ( | Block | ablock | ) |
Visit behavior tree actions using block with parameters String name and BTAction action.
References hasBTCondition().
Referenced by setSMAction().
| void Dragengine.Scenery.GWBehaviorBTSM.forEachBTCondition | ( | Block | ablock | ) |
Visit behavior tree conditions using block with parameters String name and BTCondition condition.
References setAction(), setBTAction(), and setSMAction().
Referenced by removeBTAction().
| void Dragengine.Scenery.GWBehaviorBTSM.forEachSMAction | ( | Block | ablock | ) |
Visit state machine actions using block with parameters String name and SMAction action.
Referenced by runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.forEachSMCondition | ( | Block | ablock | ) |
Visit state machine conditions using block with parameters String name and SMCondition condition.
Referenced by runSMEvent().
| BTAction Dragengine.Scenery.GWBehaviorBTSM.getBTAction | ( | String | name | ) |
Behavior tree action for name or null if absent.
References getBTConditionCount().
Referenced by getSMAction().
| int Dragengine.Scenery.GWBehaviorBTSM.getBTActionCount | ( | ) |
Count of behavior tree actions.
Referenced by getSMActionCount().
| BTCondition Dragengine.Scenery.GWBehaviorBTSM.getBTCondition | ( | String | name | ) |
Behavior tree condition for name or null if absent.
References dispose().
Referenced by hasBTAction().
| int Dragengine.Scenery.GWBehaviorBTSM.getBTConditionCount | ( | ) |
| SMAction Dragengine.Scenery.GWBehaviorBTSM.getSMAction | ( | String | name | ) |
State machine action for name or null if absent.
References getBTAction().
Referenced by runSMEvent().
| int Dragengine.Scenery.GWBehaviorBTSM.getSMActionCount | ( | ) |
Count of state machine actions.
References getBTActionCount(), and pBTActions.
Referenced by runSMEvent().
| SMCondition Dragengine.Scenery.GWBehaviorBTSM.getSMCondition | ( | String | name | ) |
| int Dragengine.Scenery.GWBehaviorBTSM.getSMConditionCount | ( | ) |
| bool Dragengine.Scenery.GWBehaviorBTSM.hasBTAction | ( | String | name | ) |
| bool Dragengine.Scenery.GWBehaviorBTSM.hasBTCondition | ( | String | name | ) |
Behavior tree condition is present.
References init(), and setAction().
Referenced by forEachBTAction().
| bool Dragengine.Scenery.GWBehaviorBTSM.hasSMAction | ( | String | name | ) |
State machine action is present.
References hasBTAction(), and pBTActions.
Referenced by runSMEvent().
| bool Dragengine.Scenery.GWBehaviorBTSM.hasSMCondition | ( | String | name | ) |
State machine condition is present.
References new(), and setBTCondition().
Referenced by runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.init | ( | StubGameWorld | stub | ) |
Initialize game world from stub.
Reimplemented from Dragengine.Scenery.DefaultGWBehavior.
References new().
Referenced by hasBTCondition().
| GWBehaviorBTSM Dragengine.Scenery.GWBehaviorBTSM.new | ( | GameWorld | gameWorld | ) |
Create element.
Reimplemented from Dragengine.Scenery.DefaultGWBehavior.
Referenced by getSMCondition(), getSMConditionCount(), hasSMCondition(), init(), registerReceiveEvents(), removeAllSMActions(), runSMEvent(), setAction(), setCondition(), and unregisterReceiveEvents().
| void Dragengine.Scenery.GWBehaviorBTSM.registerReceiveEvents | ( | ECBehaviorStateMachine.Instance | stateMachine | ) |
Register state machine to receive events.
References new(), and pBTActions.
Referenced by runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.removeAllBTActions | ( | ) |
| void Dragengine.Scenery.GWBehaviorBTSM.removeAllBTConditions | ( | ) |
Remove all behavior tree conditions.
References setAction(), setActionCondition(), and setCondition().
Referenced by removeSMCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.removeAllSMActions | ( | ) |
| void Dragengine.Scenery.GWBehaviorBTSM.removeAllSMConditions | ( | ) |
Remove all state machine conditions.
Referenced by runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.removeBTAction | ( | String | name | ) |
| void Dragengine.Scenery.GWBehaviorBTSM.removeBTCondition | ( | String | name | ) |
Remove behavior tree condition.
Referenced by setSMCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.removeSMAction | ( | String | name | ) |
| void Dragengine.Scenery.GWBehaviorBTSM.removeSMCondition | ( | String | name | ) |
| void Dragengine.Scenery.GWBehaviorBTSM.runSMEvent | ( | String | event | ) |
Run event on registered state machines.
To avoid conflicts with events send by element class behaviors prefix event with "gameWorld." unless it is a global event with unique name.
References forEachSMAction(), forEachSMCondition(), getSMAction(), getSMActionCount(), getSMCondition(), getSMConditionCount(), hasSMAction(), hasSMCondition(), new(), pBTActions, pReceiveEventsSMs, registerReceiveEvents(), removeAllBTActions(), removeAllSMActions(), removeAllSMConditions(), removeBTAction(), removeSMAction(), removeSMCondition(), runSMEvent(), setSMAction(), setSMCondition(), and unregisterReceiveEvents().
Referenced by runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.setAction | ( | String | name, |
| BTSMActionCondition | action ) |
Set state machine and behavior tree action.
References new(), and pBTActions.
Referenced by forEachBTCondition(), hasBTCondition(), and removeAllBTConditions().
| void Dragengine.Scenery.GWBehaviorBTSM.setActionCondition | ( | String | name, |
| BTSMActionCondition | actionCondition ) |
Set state machine and behavior tree action and condition.
References dispose(), and pBTActions.
Referenced by removeAllBTConditions().
| void Dragengine.Scenery.GWBehaviorBTSM.setBTAction | ( | String | name, |
| Block | action ) |
Set behavior tree action for name using block.
| void Dragengine.Scenery.GWBehaviorBTSM.setBTAction | ( | String | name, |
| BTAction | action ) |
Set behavior tree action for name.
Referenced by forEachBTCondition(), removeSMAction(), and unregisterReceiveEvents().
| void Dragengine.Scenery.GWBehaviorBTSM.setBTCondition | ( | String | name, |
| Block | condition ) |
Set behavior tree condition for name using block.
References setBTCondition(), setCondition(), and setSMCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.setBTCondition | ( | String | name, |
| BTCondition | condition ) |
Set behavior tree condition for name.
Referenced by hasSMCondition(), removeAllBTActions(), and setBTCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.setCondition | ( | String | name, |
| BTSMActionCondition | condition ) |
Set state machine and behavior tree condition.
References new(), and pReceiveEventsSMs.
Referenced by removeAllBTConditions(), and setBTCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.setSMAction | ( | String | name, |
| Block | action ) |
Set state machine action for name using block.
References forEachBTAction(), and pBTActions.
| void Dragengine.Scenery.GWBehaviorBTSM.setSMAction | ( | String | name, |
| SMAction | action ) |
Set state machine action for name.
Referenced by forEachBTCondition(), and runSMEvent().
| void Dragengine.Scenery.GWBehaviorBTSM.setSMCondition | ( | String | name, |
| Block | condition ) |
Set state machine condition for name using block.
| void Dragengine.Scenery.GWBehaviorBTSM.setSMCondition | ( | String | name, |
| SMCondition | condition ) |
Set state machine condition for name.
References removeBTCondition().
Referenced by runSMEvent(), and setBTCondition().
| void Dragengine.Scenery.GWBehaviorBTSM.unregisterReceiveEvents | ( | ECBehaviorStateMachine.Instance | stateMachine | ) |
Unregister state machine from receiving events.
References new(), pBTActions, and setBTAction().
Referenced by runSMEvent().
| Dictionary Dragengine.Scenery.GWBehaviorBTSM.pBTActions |
| SafeArray Dragengine.Scenery.GWBehaviorBTSM.pReceiveEventsSMs |
Referenced by dispose(), getBTConditionCount(), runSMEvent(), and setCondition().