Drag[en]gine Script Module DragonScript
1.23
|
Behavior instance. More...
Public Member Functions | |
void | addLinearVelocity (Vector velocity) |
Add linear velocity. More... | |
void | addListener (Listener listener) |
Add listener. More... | |
void | addToGameWorld () |
Add element to game world. More... | |
void | applyGravity (float elapsed) |
Apply default gravity. More... | |
void | applyGravity (Vector gravity, float elapsed) |
Apply gravity. More... | |
bool | canHitCollider (Collider owner, Collider collider) |
Colliders can hit each other. More... | |
void | dispose () |
Dispose of composeable instance. More... | |
void | geometryChanged () |
Position or orientation changed. More... | |
ECBehaviorCollider.Instance | getBaseCollider () |
Base collider behavior instance. More... | |
ColliderVolume | getCollider () |
Collider AI. More... | |
ECBehaviorColliderAI | getECBehavior () |
Behavior. More... | |
Vector | getGravity () |
Default gravity to apply. More... | |
ShapeList | getShape () |
Shape of collider. More... | |
void | init (StubElement stub) |
Initialize element from stub. More... | |
Instance | new (ECBehaviorColliderAI ecbehavior, BehaviorElement element) |
Create element. More... | |
void | removeFromGameWorld () |
Remove element from game world. More... | |
void | removeListener (Listener listener) |
Remove listener. More... | |
void | setFromLocomotion (ECBehaviorLocomotion.Instance behavior) |
Set orientation and linear velocity from locomotion. More... | |
void | setFromLocomotion (Locomotion locomotion) |
Set orientation and linear velocity from locomotion. More... | |
void | setGeometryFromCollider () |
Set element position and orientation from collider. More... | |
void | setGravity (Vector gravity) |
Set default gravity to apply. More... | |
void | setShape (ShapeList shape) |
Set shape of collider. More... | |
void | setShapeHumanoid (float radius, float height) |
Set collider shape for humanoid actors. More... | |
void | stateChanged () |
State changed (visble, touchable). More... | |
void | stopMoving () |
Clear all velocities. More... | |
void | stopTurning () |
Clear angular velocities. More... | |
void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
Write element to file. More... | |
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. More... | |
void | enterFrame () |
Frame update started. 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 | readFromFile (PersistencyEnvironment env, FileReader reader) |
Read behavior instance from file. More... | |
bool | requiresEnterFrame () |
Behavior instance requires enterFrame() to be called. More... | |
bool | requiresThink () |
Behavior instance requires think() to be called. More... | |
void | think (float elapsed) |
Think about what to do for the next frame update. More... | |
Public Member Functions inherited from Dragengine.Scenery.ColliderListener | |
void | collisionResponse (Collider owner, CollisionInfo info) |
Calculate response for a collision. More... | |
void | colliderChanged (Collider owner) |
Collider properties have changed and attached resources have been updated. More... | |
Public Attributes | |
ECBehaviorCollider.Instance | pBaseCollider |
ColliderVolume | pCollider |
ECBehaviorColliderAI | pECBehavior |
Vector | pGravity |
Array | pListeners |
Protected Member Functions | |
ColliderVolume | createCollider (StubElement stub) |
Create collider. 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.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addLinearVelocity | ( | Vector | velocity | ) |
Add linear velocity.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addListener | ( | Listener | listener | ) |
Add listener.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addToGameWorld | ( | ) |
Add element to game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.applyGravity | ( | float | elapsed | ) |
Apply default gravity.
If default gravity is null uses element game world gravity.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.applyGravity | ( | Vector | gravity, |
float | elapsed | ||
) |
Apply gravity.
Gravity has to be negative to pull actor towards ground.
bool Dragengine.Scenery.ECBehaviorColliderAI.Instance.canHitCollider | ( | Collider | owner, |
Collider | collider | ||
) |
Colliders can hit each other.
Implements Dragengine.Scenery.ColliderListener.
|
protected |
Create collider.
stub | Stub to use. |
component | Component to use or null if absent. |
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.dispose | ( | ) |
Dispose of composeable instance.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.geometryChanged | ( | ) |
Position or orientation changed.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.getBaseCollider | ( | ) |
Base collider behavior instance.
ColliderVolume Dragengine.Scenery.ECBehaviorColliderAI.Instance.getCollider | ( | ) |
Collider AI.
ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorColliderAI.Instance.getECBehavior | ( | ) |
Behavior.
Vector Dragengine.Scenery.ECBehaviorColliderAI.Instance.getGravity | ( | ) |
Default gravity to apply.
ShapeList Dragengine.Scenery.ECBehaviorColliderAI.Instance.getShape | ( | ) |
Shape of collider.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.init | ( | StubElement | stub | ) |
Initialize element from stub.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.new | ( | ECBehaviorColliderAI | ecbehavior, |
BehaviorElement | element | ||
) |
Create element.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.removeFromGameWorld | ( | ) |
Remove element from game world.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.removeListener | ( | Listener | listener | ) |
Remove listener.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setFromLocomotion | ( | ECBehaviorLocomotion.Instance | behavior | ) |
Set orientation and linear velocity from locomotion.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setFromLocomotion | ( | Locomotion | locomotion | ) |
Set orientation and linear velocity from locomotion.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setGeometryFromCollider | ( | ) |
Set element position and orientation from collider.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setGravity | ( | Vector | gravity | ) |
Set default gravity to apply.
Default value is null which means using element game world gravity.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setShape | ( | ShapeList | shape | ) |
Set shape of collider.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setShapeHumanoid | ( | float | radius, |
float | height | ||
) |
Set collider shape for humanoid actors.
Assigns a capsule oriented along the actor Y axis. The shape is located half the height above the actor position. This is a reasonable shape for a humanoid actor.
radius | Radius of circle centered at actor position as seen from straight above. A good radius for an average humanoid actor is 0.3m . |
height | Height of the actor from the top most position down to the ground. A good value is 1.8m . |
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stateChanged | ( | ) |
State changed (visble, touchable).
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stopMoving | ( | ) |
Clear all velocities.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stopTurning | ( | ) |
Clear angular velocities.
void Dragengine.Scenery.ECBehaviorColliderAI.Instance.writeToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write element to file.
Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.
ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.pBaseCollider |
ColliderVolume Dragengine.Scenery.ECBehaviorColliderAI.Instance.pCollider |
ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorColliderAI.Instance.pECBehavior |
Vector Dragengine.Scenery.ECBehaviorColliderAI.Instance.pGravity |
Array Dragengine.Scenery.ECBehaviorColliderAI.Instance.pListeners |