Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Classes | |
class | NoMoreTouchingGround |
Clear ridable and apply ridable velocity if no more touching ground. More... | |
class | UpdateLocomotionListener |
Update locomotion on collider changed. More... | |
Public Member Functions | |
void | addListener (Listener listener) |
Add listener. More... | |
void | clearRidable () |
Set ridable to null. More... | |
void | dispose () |
Dispose of behavior instance. More... | |
void | enterFrame () |
Frame update started. More... | |
ECBehaviorRideOn | getECBehavior () |
Behavior. More... | |
Vector | getLinearVelocity () |
Linear velocity of ridable or zero vector if absent. More... | |
bool | getLocked () |
Lock ridable. More... | |
ECBehaviorLocomotion.Instance | getLocomotion () |
Locomotion behavior instance. More... | |
ECBehaviorProjectToGround.Instance | getProjectToGround () |
Project to ground behavior instance. More... | |
ECBehaviorRidable.Instance | getRidable () |
Ridable the actor is riding on or null. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
bool | isNotRiding () |
Actor is not riding. More... | |
Instance | new (ECBehaviorRideOn ecbehavior, BehaviorElement element) |
Create behavior instance. More... | |
void | onNoMoreTouchingGround () |
Actor is no more touching ground. More... | |
void | postThink (float elapsed) |
Post think about what to do for the next frame update. More... | |
void | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior from file. More... | |
void | removeFromGameWorld () |
Remove from game world. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setLocked (bool locked) |
Set if ridable is locked. More... | |
void | setRidable (ECBehaviorRidable.Instance ridable) |
Set ridable the actor is riding on or null. More... | |
void | updateLocomotion () |
Update locomotion orientation from ridable if present. 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 | 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... | |
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... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write behavior instance to file. More... | |
Additional Inherited Members | |
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.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.addListener | ( | Listener | listener | ) |
Add 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.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.enterFrame | ( | ) |
Frame update started.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.getECBehavior | ( | ) |
Behavior.
Vector Dragengine.Scenery.ECBehaviorRideOn.Instance.getLinearVelocity | ( | ) |
Linear velocity of ridable or zero vector if absent.
bool Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocked | ( | ) |
Lock ridable.
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getLocomotion | ( | ) |
Locomotion behavior instance.
ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.getProjectToGround | ( | ) |
Project to ground behavior instance.
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.
bool Dragengine.Scenery.ECBehaviorRideOn.Instance.isNotRiding | ( | ) |
Actor is not riding.
Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.new | ( | ECBehaviorRideOn | ecbehavior, |
BehaviorElement | element | ||
) |
Create behavior instance.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.onNoMoreTouchingGround | ( | ) |
Actor is no more touching ground.
If not locked calls setRidable(null).
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.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read behavior from file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeFromGameWorld | ( | ) |
Remove from game world.
Calls setRidable(null).
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.setLocked | ( | bool | locked | ) |
Set if ridable is locked.
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.
void Dragengine.Scenery.ECBehaviorRideOn.Instance.updateLocomotion | ( | ) |
Update locomotion orientation from ridable if present.
ECBehaviorRideOn Dragengine.Scenery.ECBehaviorRideOn.Instance.pECBehavior |
ElementResolver Dragengine.Scenery.ECBehaviorRideOn.Instance.pElementResolver |
Array Dragengine.Scenery.ECBehaviorRideOn.Instance.pListeners |
bool Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocked |
ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pLocomotion |
ECBehaviorProjectToGround.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pProjectToGround |
ECBehaviorRidable.Instance Dragengine.Scenery.ECBehaviorRideOn.Instance.pRidable |