Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorColliderAI.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorColliderAI.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ColliderListener Dragengine.Scenery.ECBehaviorInstance

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...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ addLinearVelocity()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addLinearVelocity ( Vector  velocity)

Add linear velocity.

◆ addListener()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addListener ( Listener  listener)

Add listener.

◆ addToGameWorld()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.addToGameWorld ( )

Add element to game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ applyGravity() [1/2]

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.applyGravity ( float  elapsed)

Apply default gravity.

If default gravity is null uses element game world gravity.

◆ applyGravity() [2/2]

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.applyGravity ( Vector  gravity,
float  elapsed 
)

Apply gravity.

Gravity has to be negative to pull actor towards ground.

◆ canHitCollider()

bool Dragengine.Scenery.ECBehaviorColliderAI.Instance.canHitCollider ( Collider  owner,
Collider  collider 
)

Colliders can hit each other.

Implements Dragengine.Scenery.ColliderListener.

◆ createCollider()

ColliderVolume Dragengine.Scenery.ECBehaviorColliderAI.Instance.createCollider ( StubElement  stub)
protected

Create collider.

Parameters
stubStub to use.
componentComponent to use or null if absent.

◆ dispose()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.dispose ( )

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ geometryChanged()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.geometryChanged ( )

Position or orientation changed.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getBaseCollider()

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.getBaseCollider ( )

Base collider behavior instance.

◆ getCollider()

ColliderVolume Dragengine.Scenery.ECBehaviorColliderAI.Instance.getCollider ( )

Collider AI.

◆ getECBehavior()

ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorColliderAI.Instance.getECBehavior ( )

Behavior.

◆ getGravity()

Vector Dragengine.Scenery.ECBehaviorColliderAI.Instance.getGravity ( )

Default gravity to apply.

◆ getShape()

ShapeList Dragengine.Scenery.ECBehaviorColliderAI.Instance.getShape ( )

Shape of collider.

Version
1.19

◆ init()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.init ( StubElement  stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.new ( ECBehaviorColliderAI  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ removeFromGameWorld()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.removeFromGameWorld ( )

Remove element from game world.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.removeListener ( Listener  listener)

Remove listener.

◆ setFromLocomotion() [1/2]

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setFromLocomotion ( ECBehaviorLocomotion.Instance  behavior)

Set orientation and linear velocity from locomotion.

◆ setFromLocomotion() [2/2]

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setFromLocomotion ( Locomotion  locomotion)

Set orientation and linear velocity from locomotion.

◆ setGeometryFromCollider()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setGeometryFromCollider ( )

Set element position and orientation from collider.

◆ setGravity()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setGravity ( Vector  gravity)

Set default gravity to apply.

Default value is null which means using element game world gravity.

◆ setShape()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.setShape ( ShapeList  shape)

Set shape of collider.

◆ setShapeHumanoid()

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.

Parameters
radiusRadius of circle centered at actor position as seen from straight above. A good radius for an average humanoid actor is 0.3m .
heightHeight of the actor from the top most position down to the ground. A good value is 1.8m .

◆ stateChanged()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stateChanged ( )

State changed (visble, touchable).

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ stopMoving()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stopMoving ( )

Clear all velocities.

◆ stopTurning()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.stopTurning ( )

Clear angular velocities.

◆ writeToFile()

void Dragengine.Scenery.ECBehaviorColliderAI.Instance.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write element to file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

Member Data Documentation

◆ pBaseCollider

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorColliderAI.Instance.pBaseCollider

◆ pCollider

ColliderVolume Dragengine.Scenery.ECBehaviorColliderAI.Instance.pCollider

◆ pECBehavior

ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorColliderAI.Instance.pECBehavior

◆ pGravity

Vector Dragengine.Scenery.ECBehaviorColliderAI.Instance.pGravity

◆ pListeners

Array Dragengine.Scenery.ECBehaviorColliderAI.Instance.pListeners

The documentation for this class was generated from the following file: