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

Base actor action aligning actors using ECBehaviorAlignActor. More...

Inheritance diagram for Dragengine.Scenery.BAAAlignActor:
Dragengine.Scenery.BaseActorAction Dragengine.LoadSave.Persistable

Classes

class  Factory
 Factory for loading actor actions. More...
 

Public Member Functions

void activate (BehaviorElement actor)
 Action has been set as active action in an actor. More...
 
void cancel ()
 Cancel action the next time possible. More...
 
bool canHitCollider (Collider owner, Collider collider)
 Two colliders can hit each other. More...
 
void colliderChanged (Collider owner)
 Collider changed. More...
 
void deactivate ()
 Action has been unset as active action in an actor. More...
 
void enterFrame ()
 Actor has been added to game world and enterFrame() is called once. More...
 
BaseActorAction getActionFailed ()
 Action to switch to if aligning failed. More...
 
BaseActorAction getActionSucceeded ()
 Action to switch to if aligning succeeded. More...
 
bool getCallAIFinished ()
 Call aiFinished() if aligning finished. More...
 
ConversationPlaybackLookAt getLookAt ()
 Conversation look-at. More...
 
Element getRelativeTargetElement ()
 Relative target element. More...
 
float getTargetLookVertical ()
 Target looking up-down. More...
 
float getTargetOrientation ()
 Target orientation. More...
 
DVector getTargetPosition ()
 Target position. More...
 
BAAAlignActor new (BaseActorAction succeeded)
 Create align actor action. More...
 
BAAAlignActor new (BaseActorAction succeeded, BaseActorAction failed)
 Create align actor action. More...
 
BAAAlignActor new (PersistencyEnvironment env, FileReader reader)
 Create align actor action from persisted state. More...
 
String persistencyFactoryName ()
 Name of PersistencyFactory required to load object from file. More...
 
void setActionFailed (BaseActorAction action)
 Set action to switch to if aligning failed. More...
 
void setActionSucceeded (BaseActorAction action)
 Set action to switch to if aligning succeeded. More...
 
void setCallAIFinished (bool sendActionFinished)
 Set if aiFinished() is called if aligning finished. More...
 
void setLookAt (ConversationPlaybackLookAt lookAt)
 Set conversation look-at. More...
 
void setRelativeTargetElement (Element element)
 Set relative target position. 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 think (float elapsed)
 Thinking. More...
 
void writeObjectToFile (PersistencyEnvironment env, FileWriter writer)
 Write object to file writer. More...
 
- Public Member Functions inherited from Dragengine.Scenery.BaseActorAction
void activateWhileLoading (BehaviorElement actor)
 Action has been set as active action in an actor while loading. More...
 
void aiFailed ()
 Notify actor AI this action failed. More...
 
void aiFinished ()
 Notify actor AI this action failed. More...
 
void collisionResponse (Collider owner, CollisionInfo info)
 Collision detected. More...
 
bool conversationWait ()
 Check if conversation actions have to wait for actor to finish this action. More...
 
void dispose ()
 Dispose of actor action. More...
 
void enteredGameWorld ()
 Actor entered game world. More...
 
BehaviorElement getActor ()
 Actor the action is assigned to or null. More...
 
ECBehaviorActorAnimated.Instance getActorAnimated ()
 Actor animated behavior if present. More...
 
ECBehaviorActorAIAction.Instance getAIAction ()
 Behavior actor ai-action or null. More...
 
ECBehaviorConversationActor.Instance getConversationActor ()
 Conversation actor behavior if present. More...
 
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior. More...
 
ECBehaviorPlayerControllable.Instance getPlayerControllable ()
 Behavior player controllable or null. More...
 
bool isActive ()
 Action is active actor action. More...
 
bool isControlledByPlayer ()
 Actor is controlled by player. More...
 
bool isNotActive ()
 Action is not active actor action. More...
 
void leftGameWorld ()
 Actor left game world. More...
 
void log (Console console, Element element, String text)
 Log text about element to console prefixed with actor information. More...
 
void log (Console console, Exception exception)
 Log exception to console prefixed with actor information. More...
 
void log (Console console, String text)
 Log text to console prefixed with actor information. More...
 
void log (Element element, String text)
 Log text about element to BaseGameApp console prefixed with actor information. More...
 
void log (Exception exception)
 Log exception to BaseGameApp console prefixed with actor information. More...
 
void log (String text)
 Log text to BaseGameApp console prefixed with actor information. More...
 
String loggingPrefix ()
 Logging prefix. More...
 
BaseActorAction new ()
 Create actor action. More...
 
void playerPostThink (float elapsed)
 Post physics for player controlled actor only. More...
 
void playerReleasesControl ()
 Player released control of actor. More...
 
void playerTakesControl ()
 Player takes control of actor. More...
 
void playerThink (float elapsed)
 Thinking for player controlled actor only. More...
 
void postThink (float elapsed)
 Post physics. More...
 

Protected Member Functions

void initBehaviors ()
 Init behaviors. More...
 
void resetPlayerInput ()
 Reset player input. More...
 
void startAligningActor ()
 Start aligning actor. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.BaseActorAction
void applyAnimations ()
 Apply animations. More...
 
void initAnimator ()
 Initialize animator. More...
 
void updateAICollider (float elapsed)
 Update AI collider. More...
 
void updateAnimator (float elapsed)
 Update animator controllers. More...
 
void updateLocomotion (float elapsed)
 Update locomotion. More...
 

Protected Attributes

ECBehaviorActorMover.Instance actorMover
 Actor mover behavior. More...
 
ECBehaviorAlignActor.Instance alignActor
 Align actor behavior. More...
 
ECBehaviorPlayerInputCrouch.Instance playerInputCrouch
 Player input crouching behavior. More...
 
ECBehaviorPlayerInputLook.Instance playerInputLook
 Player input looking around behavior. More...
 
ECBehaviorPlayerInputMove.Instance playerInputMove
 Player input moving behavior. More...
 
- Protected Attributes inherited from Dragengine.Scenery.BaseActorAction
BehaviorElement actor
 Actor the action is assigned to or null. More...
 
ECBehaviorActorAnimated.Instance actorAnimated
 Actor animated behavior if present. More...
 
ECBehaviorActorAIAction.Instance aiAction
 Behavior actor ai-action or null. More...
 
ECBehaviorConversationActor.Instance conversationActor
 Conversation actor behavior if present. More...
 
ECBehaviorLocomotion.Instance locomotion
 Locomotion behavior. More...
 
ECBehaviorPlayerControllable.Instance playerControllable
 Behavior player controllable or null. More...
 

Detailed Description

Base actor action aligning actors using ECBehaviorAlignActor.

This class is a typical transition action. Upon activating the ECBehaviorAlignActor is set up and aligning started. While aligning is running no locomotion update is allowed since all is done by ECBehaviorAlignActor. Once finished a previously set BaseActorAction is activated and the transition ends.

Use this class if you need to align one or more of these actor parameters:

This is typically the case if an actor needs to be in a specifi position and orientation to match animation with another game world element.

Member Function Documentation

◆ activate()

void Dragengine.Scenery.BAAAlignActor.activate ( BehaviorElement  actor)

Action has been set as active action in an actor.

Starts aligning actor.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ cancel()

void Dragengine.Scenery.BAAAlignActor.cancel ( )

Cancel action the next time possible.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ canHitCollider()

bool Dragengine.Scenery.BAAAlignActor.canHitCollider ( Collider  owner,
Collider  collider 
)

Two colliders can hit each other.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ colliderChanged()

void Dragengine.Scenery.BAAAlignActor.colliderChanged ( Collider  owner)

Collider changed.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ deactivate()

void Dragengine.Scenery.BAAAlignActor.deactivate ( )

Action has been unset as active action in an actor.

If actor is still aligning cancel aligning. No next action is activated. Player input is cleared to avoid troubles.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ enterFrame()

void Dragengine.Scenery.BAAAlignActor.enterFrame ( )

Actor has been added to game world and enterFrame() is called once.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ getActionFailed()

BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionFailed ( )

Action to switch to if aligning failed.

◆ getActionSucceeded()

BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionSucceeded ( )

Action to switch to if aligning succeeded.

◆ getCallAIFinished()

bool Dragengine.Scenery.BAAAlignActor.getCallAIFinished ( )

Call aiFinished() if aligning finished.

◆ getLookAt()

ConversationPlaybackLookAt Dragengine.Scenery.BAAAlignActor.getLookAt ( )

Conversation look-at.

◆ getRelativeTargetElement()

Element Dragengine.Scenery.BAAAlignActor.getRelativeTargetElement ( )

Relative target element.

◆ getTargetLookVertical()

float Dragengine.Scenery.BAAAlignActor.getTargetLookVertical ( )

Target looking up-down.

◆ getTargetOrientation()

float Dragengine.Scenery.BAAAlignActor.getTargetOrientation ( )

Target orientation.

◆ getTargetPosition()

DVector Dragengine.Scenery.BAAAlignActor.getTargetPosition ( )

Target position.

◆ initBehaviors()

void Dragengine.Scenery.BAAAlignActor.initBehaviors ( )
protected

Init behaviors.

Retrieve and store required and optional behavior instances from the actor element.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ new() [1/3]

BAAAlignActor Dragengine.Scenery.BAAAlignActor.new ( BaseActorAction  succeeded)

Create align actor action.

Parameters
succeededAction to switch to if aligning finished or failed.

◆ new() [2/3]

BAAAlignActor Dragengine.Scenery.BAAAlignActor.new ( BaseActorAction  succeeded,
BaseActorAction  failed 
)

Create align actor action.

Parameters
succeededAction to switch to if aligning succeeded.
failedAction to switch to if aligning failed.

◆ new() [3/3]

BAAAlignActor Dragengine.Scenery.BAAAlignActor.new ( PersistencyEnvironment  env,
FileReader  reader 
)

Create align actor action from persisted state.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ persistencyFactoryName()

String Dragengine.Scenery.BAAAlignActor.persistencyFactoryName ( )

Name of PersistencyFactory required to load object from file.

Name of PersistencyFactory is first written to the file as string with 8-bit length. Then writeToFile() is called to write the object itself. Empty name is not allowed as is names longer than 255 characters. Name has to match a PersistencyFactory present in the Persistency instance used for loading objects. Object is read using PersistencyFactory.readObjectFromFile() of the matching PersistencyFactory.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ resetPlayerInput()

void Dragengine.Scenery.BAAAlignActor.resetPlayerInput ( )
protected

Reset player input.

◆ setActionFailed()

void Dragengine.Scenery.BAAAlignActor.setActionFailed ( BaseActorAction  action)

Set action to switch to if aligning failed.

◆ setActionSucceeded()

void Dragengine.Scenery.BAAAlignActor.setActionSucceeded ( BaseActorAction  action)

Set action to switch to if aligning succeeded.

◆ setCallAIFinished()

void Dragengine.Scenery.BAAAlignActor.setCallAIFinished ( bool  sendActionFinished)

Set if aiFinished() is called if aligning finished.

◆ setLookAt()

void Dragengine.Scenery.BAAAlignActor.setLookAt ( ConversationPlaybackLookAt  lookAt)

Set conversation look-at.

◆ setRelativeTargetElement()

void Dragengine.Scenery.BAAAlignActor.setRelativeTargetElement ( Element  element)

Set relative target position.

◆ setTarget()

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

Set target.

◆ setTargetFromLocomotion()

void Dragengine.Scenery.BAAAlignActor.setTargetFromLocomotion ( )

Set target from locomotion.

◆ setTargetLookVertical()

void Dragengine.Scenery.BAAAlignActor.setTargetLookVertical ( float  lookVertical)

Set target looking up-down.

◆ setTargetOrientation() [1/2]

void Dragengine.Scenery.BAAAlignActor.setTargetOrientation ( DVector  targetPosition)

Set target orientation.

◆ setTargetOrientation() [2/2]

void Dragengine.Scenery.BAAAlignActor.setTargetOrientation ( float  orientation)

Set target orientation.

◆ setTargetPosition()

void Dragengine.Scenery.BAAAlignActor.setTargetPosition ( DVector  position)

Set target position.

◆ startAligningActor()

void Dragengine.Scenery.BAAAlignActor.startAligningActor ( )
protected

Start aligning actor.

◆ think()

void Dragengine.Scenery.BAAAlignActor.think ( float  elapsed)

Thinking.

If aligning finished switches to finished or failed action depending if aligning succeeded or failed.

Reimplemented from Dragengine.Scenery.BaseActorAction.

◆ writeObjectToFile()

void Dragengine.Scenery.BAAAlignActor.writeObjectToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write object to file writer.

Reimplemented from Dragengine.Scenery.BaseActorAction.

Member Data Documentation

◆ actorMover

ECBehaviorActorMover.Instance Dragengine.Scenery.BAAAlignActor.actorMover
protected

Actor mover behavior.

◆ alignActor

ECBehaviorAlignActor.Instance Dragengine.Scenery.BAAAlignActor.alignActor
protected

Align actor behavior.

◆ playerInputCrouch

ECBehaviorPlayerInputCrouch.Instance Dragengine.Scenery.BAAAlignActor.playerInputCrouch
protected

Player input crouching behavior.

◆ playerInputLook

ECBehaviorPlayerInputLook.Instance Dragengine.Scenery.BAAAlignActor.playerInputLook
protected

Player input looking around behavior.

◆ playerInputMove

ECBehaviorPlayerInputMove.Instance Dragengine.Scenery.BAAAlignActor.playerInputMove
protected

Player input moving behavior.


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