|
Drag[en]gine Script Module DragonScript 1.35
|
Behavior instance. More...
Public Member Functions | |
| void | addListener (Listener listener) |
| Add listener. | |
| void | clearRidable () |
| Set ridable to null. | |
| void | dispose () |
| Dispose of behavior instance. | |
| void | enterFrame () |
| Frame update started. | |
| ECBehaviorRideOn | getECBehavior () |
| Behavior. | |
| Vector | getLinearVelocity () |
| Linear velocity of ridable or zero vector if absent. | |
| bool | getLocked () |
| Lock ridable. | |
| ECBehaviorLocomotion.Instance | getLocomotion () |
| Locomotion behavior instance. | |
| ECBehaviorProjectToGround.Instance | getProjectToGround () |
| Project to ground behavior instance. | |
| ECBehaviorRidable.Instance | getRidable () |
| Ridable the actor is riding on or null. | |
| void | init (StubElement stub) |
| Initialize element from stub. | |
| bool | isNotRiding () |
| Actor is not riding. | |
| Instance | new (ECBehaviorRideOn ecbehavior, BehaviorElement element) |
| Create behavior instance. | |
| void | onNoMoreTouchingGround () |
| Actor is no more touching ground. | |
| void | postThink (float elapsed) |
| Post think about what to do for the next frame update. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read behavior from file. | |
| void | removeFromGameWorld () |
| Remove from game world. | |
| void | removeListener (Listener listener) |
| Remove listener. | |
| void | setLocked (bool locked) |
| Set if ridable is locked. | |
| void | setRidable (ECBehaviorRidable.Instance ridable) |
| Set ridable the actor is riding on or null. | |
| void | updateLocomotion () |
| Update locomotion orientation from ridable if present. | |
| Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance | |
| void | addToGameWorld () |
| Add element to game world. | |
| 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. | |
| 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 |
| ECBehaviorRideOn | pECBehavior |
| ElementResolver | pElementResolver |
| Array | pListeners |
| bool | pLocked |
| ECBehaviorLocomotion.Instance | pLocomotion |
| ECBehaviorProjectToGround.Instance | pProjectToGround |
| ECBehaviorRidable.Instance | pRidable |
| 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. | |
Behavior instance.
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.addListener | ( | Listener | listener | ) |
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.clearRidable | ( | ) |
Set ridable to null.
Same as calling setRidable(null).
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.dispose | ( | ) |
Dispose of behavior instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Referenced by enterFrame(), and removeListener().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.enterFrame | ( | ) |
Frame update started.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
| ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.getECBehavior | ( | ) |
Behavior.
References new().
| Vector Dragengine.Scenery.ECBehaviorRideOn.Instance.getLinearVelocity | ( | ) |
Linear velocity of ridable or zero vector if absent.
| bool Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocked | ( | ) |
Lock ridable.
References new().
| ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocomotion | ( | ) |
Locomotion behavior instance.
Referenced by removeListener().
| ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getProjectToGround | ( | ) |
Project to ground behavior instance.
Referenced by removeListener().
| ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getRidable | ( | ) |
Ridable the actor is riding on or null.
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Referenced by removeFromGameWorld().
| bool Dragengine.Scenery.ECBehaviorRideOn.Instance.isNotRiding | ( | ) |
Actor is not riding.
References updateLocomotion().
| Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.new | ( | ECBehaviorRideOn | ecbehavior, |
| BehaviorElement | element ) |
Create behavior instance.
Referenced by addListener(), getECBehavior(), getLocked(), readFromFile(), removeListener(), and setRidable().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.onNoMoreTouchingGround | ( | ) |
Actor is no more touching ground.
If not locked calls setRidable(null).
References pBTSMs, and pListeners.
Referenced by setLocked().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.postThink | ( | float | elapsed | ) |
Post think about what to do for the next frame update.
If locked does nothing. Otherwise if actor is grounded and element underneath is a behavior element set it as ridable otherwise clear it. If ridable is cleared applies ridable velocities to owner element.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
References pElementResolver, pListeners, pLocomotion, pProjectToGround, and pRidable.
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.readFromFile | ( | PersistencyEnvironment | env, |
| FileReader | reader ) |
Read behavior from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
References Dragengine.Scenery.ECBehaviorRideOn.getBTSMs(), new(), pBTSMs, and pECBehavior.
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeFromGameWorld | ( | ) |
Remove from game world.
Calls setRidable(null).
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
References addListener(), Dragengine.Scenery.ECBehaviorRideOn.createListeners(), init(), pECBehavior, pLocomotion, and pProjectToGround.
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
References dispose(), getLocomotion(), getProjectToGround(), new(), pListeners, pLocked, pLocomotion, pProjectToGround, and Dragengine.Scenery.DefaultECBehaviorInstance.setRequiresThink().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.setLocked | ( | bool | locked | ) |
Set if ridable is locked.
References onNoMoreTouchingGround().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.setRidable | ( | ECBehaviorRidable.Instance | ridable | ) |
Set ridable the actor is riding on or null.
If actor changes from riding to not riding applies the linear velocity of the ridable before clearing the ridable. This ensures an actor keeps moving into the direction the ridable has been moving if the actor for example jumps or the ridable vanishes.
References new().
| void Dragengine.Scenery.ECBehaviorRideOn.Instance.updateLocomotion | ( | ) |
Update locomotion orientation from ridable if present.
References pECBehavior, pElementResolver, pLocked, pLocomotion, pProjectToGround, and pRidable.
Referenced by isNotRiding().
| ECComposeBTSM.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pBTSMs |
Referenced by enterFrame(), onNoMoreTouchingGround(), and readFromFile().
| ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.pECBehavior |
Referenced by addListener(), readFromFile(), removeFromGameWorld(), and updateLocomotion().
| ElementResolver Dragengine.Scenery.ECBehaviorRideOn.Instance.pElementResolver |
Referenced by postThink(), and updateLocomotion().
| Array Dragengine.Scenery.ECBehaviorRideOn.Instance.pListeners |
Referenced by onNoMoreTouchingGround(), postThink(), and removeListener().
| bool Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocked |
Referenced by removeListener(), and updateLocomotion().
| ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocomotion |
Referenced by postThink(), removeFromGameWorld(), removeListener(), and updateLocomotion().
| ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pProjectToGround |
Referenced by postThink(), removeFromGameWorld(), removeListener(), and updateLocomotion().
| ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pRidable |
Referenced by postThink(), and updateLocomotion().