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

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorAlignActor.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Classes

class  LeaveConversation
 

Public Member Functions

void addListener (Listener listener)
 Add listener. More...
 
void cancelAligning ()
 Cancel aligning if running. More...
 
void clearTarget ()
 Clear target parameters. More...
 
void dispose ()
 Dispose of behavior instance. More...
 
void enterFrame ()
 Frame update started. More...
 
ECBehaviorConversationActor.Instance getConversationActor ()
 Conversation actor behavior or null if not used. More...
 
ECBehaviorAlignActor getECBehavior ()
 Behavior. More...
 
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior. More...
 
ConversationPlaybackLookAt getLookAt ()
 Conversation look-at. More...
 
Element getRelativeTargetElement ()
 Relative target element. More...
 
DMatrix getRelativeTargetMatrix ()
 Relative target matrix. More...
 
float getSpeed ()
 Movement speed. More...
 
float getTargetLookVertical ()
 Target looking up-down. More...
 
float getTargetOrientation ()
 Target orientation. More...
 
DVector getTargetPosition ()
 Target position. More...
 
float getWorldTargetOrientation ()
 World target orientation. More...
 
DVector getWorldTargetPosition ()
 World target position. More...
 
bool hasFailed ()
 Last aligning failed. More...
 
bool hasSucceeded ()
 Last aligning succeeded. More...
 
void init (StubElement stub)
 Initialize behavior from stub. More...
 
bool isAligning ()
 Actor is aligning. More...
 
bool isAtTarget ()
 Actor is at target position. More...
 
bool isFinished ()
 Actor is not aligning. More...
 
bool isNotAtTarget ()
 Actor is not at target position. More...
 
Instance new (ECBehaviorAlignActor ecbehavior, BehaviorElement element)
 Create behavior instance. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior from file. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void setLookAt (ConversationPlaybackLookAt lookAt)
 Set conversation look-at. More...
 
void setLookAt (DVector lookAt)
 Set conversation look-at from world position. More...
 
void setRelativeTargetElement (Element element)
 Set relative target position. More...
 
void setSpeed (float speed)
 Set movement speed. More...
 
void setTarget (Element element, DVector position, float orientation)
 Set target. More...
 
void setTargetFromLocomotion ()
 Set target from locomotion. More...
 
void setTargetLookVertical (float lookVertical)
 Set target looking up-down. More...
 
void setTargetOrientation (DVector targetPosition)
 Set target orientation. More...
 
void setTargetOrientation (float orientation)
 Set target orientation. More...
 
void setTargetPosition (DVector position)
 Set target position. More...
 
void startAligning ()
 Start aligning actor. More...
 
void think (float elapsed)
 Think about what to do for the next frame update. More...
 
void update (float elapsed)
 Update aligning. 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...
 
void postThink (float elapsed)
 Post thinking after physics processing is finished. More...
 
void removeFromGameWorld ()
 Remove element from game world. 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 writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file. More...
 

Public Attributes

bool pAlignFinished
 
ECBehaviorConversationActor.Instance pConversationActor
 
ECBehaviorAlignActor pECBehavior
 
ElementResolver pElementResolver
 
float pInitialDistance
 
bool pIsAtTarget
 
Array pListeners
 
ECBehaviorLocomotion.Instance pLocomotion
 
ConversationPlaybackLookAt pLookAt
 
Element pRelativeTargetElement
 
DMatrix pRelativeTargetMatrix
 
float pSpeed
 
bool pSucceeded
 
float pTargetLookVertical
 
float pTargetOrientation
 
DVector pTargetPosition
 

Protected Member Functions

void checkFinished ()
 Check if actor finished aligning. 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

◆ addListener()

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

Add listener.

◆ cancelAligning()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.cancelAligning ( )

Cancel aligning if running.

◆ checkFinished()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.checkFinished ( )
protected

Check if actor finished aligning.

Sets pIsAtTarget to true if all required conditions are fulfilled.

◆ clearTarget()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.clearTarget ( )

Clear target parameters.

◆ dispose()

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

Dispose of behavior instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ enterFrame()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.enterFrame ( )

Frame update started.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ getConversationActor()

ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.getConversationActor ( )

Conversation actor behavior or null if not used.

◆ getECBehavior()

ECBehaviorAlignActor Dragengine.Scenery.ECBehaviorAlignActor.Instance.getECBehavior ( )

Behavior.

◆ getLocomotion()

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.getLocomotion ( )

Locomotion behavior.

◆ getLookAt()

ConversationPlaybackLookAt Dragengine.Scenery.ECBehaviorAlignActor.Instance.getLookAt ( )

Conversation look-at.

◆ getRelativeTargetElement()

Element Dragengine.Scenery.ECBehaviorAlignActor.Instance.getRelativeTargetElement ( )

Relative target element.

◆ getRelativeTargetMatrix()

DMatrix Dragengine.Scenery.ECBehaviorAlignActor.Instance.getRelativeTargetMatrix ( )

Relative target matrix.

◆ getSpeed()

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getSpeed ( )

Movement speed.

◆ getTargetLookVertical()

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetLookVertical ( )

Target looking up-down.

◆ getTargetOrientation()

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetOrientation ( )

Target orientation.

◆ getTargetPosition()

DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.getTargetPosition ( )

Target position.

◆ getWorldTargetOrientation()

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.getWorldTargetOrientation ( )

World target orientation.

Version
1.19

If relative to element this potentially changes every frame update.

◆ getWorldTargetPosition()

DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.getWorldTargetPosition ( )

World target position.

Version
1.19

If relative to element this potentially changes every frame update.

◆ hasFailed()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.hasFailed ( )

Last aligning failed.

◆ hasSucceeded()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.hasSucceeded ( )

Last aligning succeeded.

◆ init()

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

Initialize behavior from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ isAligning()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isAligning ( )

Actor is aligning.

◆ isAtTarget()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isAtTarget ( )

Actor is at target position.

◆ isFinished()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isFinished ( )

Actor is not aligning.

◆ isNotAtTarget()

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.isNotAtTarget ( )

Actor is not at target position.

◆ new()

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

Create behavior instance.

◆ readFromFile()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)

Read behavior from file.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

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

Remove listener.

◆ setLookAt() [1/2]

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setLookAt ( ConversationPlaybackLookAt  lookAt)

Set conversation look-at.

◆ setLookAt() [2/2]

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setLookAt ( DVector  lookAt)

Set conversation look-at from world position.

Version
1.4

Shortcut for calling setLookAt() with ConversationPlaybackLookAt using ConversationCustomTarget with matrix set from world position.

◆ setRelativeTargetElement()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setRelativeTargetElement ( Element  element)

Set relative target position.

◆ setSpeed()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setSpeed ( float  speed)

Set movement speed.

◆ setTarget()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTarget ( Element  element,
DVector  position,
float  orientation 
)

Set target.

◆ setTargetFromLocomotion()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetFromLocomotion ( )

Set target from locomotion.

◆ setTargetLookVertical()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetLookVertical ( float  lookVertical)

Set target looking up-down.

◆ setTargetOrientation() [1/2]

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetOrientation ( DVector  targetPosition)

Set target orientation.

◆ setTargetOrientation() [2/2]

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetOrientation ( float  orientation)

Set target orientation.

◆ setTargetPosition()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.setTargetPosition ( DVector  position)

Set target position.

◆ startAligning()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.startAligning ( )

Start aligning actor.

Before calling set the required parameters using setTarget*(). As long as the aligning is running no modification on ECBehaviorLocomotion should be done to not cause troubles. Once isAligning() returns false or isFinished() returns true the locomotion can be modified again. Calls startAligning() on listeners. Once finished calls finishedAligning() on listeners.

This call modifies some locomotion parameters which are required for this behavior to work properly. Sets CanTurnInPlace to false and CanTurn to true. All other locomotion parameters are not modified. For player actors certain locomotion parameters should be changed otherwise it can look strange or even discomforting. Call initLocomotionPlayer() to set suitable locomotion parameters for player controlled actors.

Note
To not call if ECBehaviorActorMover is present and is moving actor
Exceptions
EInvalidParamActor is already aligning.

◆ think()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.think ( float  elapsed)

Think about what to do for the next frame update.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ update()

void Dragengine.Scenery.ECBehaviorAlignActor.Instance.update ( float  elapsed)

Update aligning.

Called by think(). While isAligning() returns true do not update locomotion using ECBehaviorPlayerInput* or other behaviors. After this call returns you can check if isAligning() still returns true. If isAligning() returns false aligning finished and you can resume updating locomotions. You can also use listeners to be notified if aligning finished or has been cancelled. It is recommended to clear all ECBehaviorPlayerInput* once finished to ensure player input did not build up.

Member Data Documentation

◆ pAlignFinished

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pAlignFinished

◆ pConversationActor

ECBehaviorConversationActor.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.pConversationActor

◆ pECBehavior

ECBehaviorAlignActor Dragengine.Scenery.ECBehaviorAlignActor.Instance.pECBehavior

◆ pElementResolver

ElementResolver Dragengine.Scenery.ECBehaviorAlignActor.Instance.pElementResolver

◆ pInitialDistance

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pInitialDistance

◆ pIsAtTarget

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pIsAtTarget

◆ pListeners

Array Dragengine.Scenery.ECBehaviorAlignActor.Instance.pListeners

◆ pLocomotion

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorAlignActor.Instance.pLocomotion

◆ pLookAt

ConversationPlaybackLookAt Dragengine.Scenery.ECBehaviorAlignActor.Instance.pLookAt

◆ pRelativeTargetElement

Element Dragengine.Scenery.ECBehaviorAlignActor.Instance.pRelativeTargetElement

◆ pRelativeTargetMatrix

DMatrix Dragengine.Scenery.ECBehaviorAlignActor.Instance.pRelativeTargetMatrix

◆ pSpeed

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pSpeed

◆ pSucceeded

bool Dragengine.Scenery.ECBehaviorAlignActor.Instance.pSucceeded

◆ pTargetLookVertical

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetLookVertical

◆ pTargetOrientation

float Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetOrientation

◆ pTargetPosition

DVector Dragengine.Scenery.ECBehaviorAlignActor.Instance.pTargetPosition

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