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

Protected Member Functions

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

Protected Attributes

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

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.

References Dragengine.Scenery.BaseActorAction.actor, and getRelativeTargetElement().

Referenced by writeObjectToFile().

◆ cancel()

void Dragengine.Scenery.BAAAlignActor.cancel ( )

Cancel action the next time possible.

Reimplemented from Dragengine.Scenery.BaseActorAction.

Referenced by writeObjectToFile().

◆ canHitCollider()

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

Two colliders can hit each other.

Reimplemented from Dragengine.Scenery.BaseActorAction.

References setLookAt().

Referenced by writeObjectToFile().

◆ colliderChanged()

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

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

References setRelativeTargetElement().

Referenced by writeObjectToFile().

◆ enterFrame()

void Dragengine.Scenery.BAAAlignActor.enterFrame ( )

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

Reimplemented from Dragengine.Scenery.BaseActorAction.

References setRelativeTargetElement(), setTarget(), setTargetOrientation(), and setTargetPosition().

Referenced by writeObjectToFile().

◆ getActionFailed()

BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionFailed ( )

Action to switch to if aligning failed.

References setTargetPosition().

Referenced by writeObjectToFile().

◆ getActionSucceeded()

BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionSucceeded ( )

Action to switch to if aligning succeeded.

Referenced by colliderChanged().

◆ getCallAIFinished()

bool Dragengine.Scenery.BAAAlignActor.getCallAIFinished ( )

Call aiFinished() if aligning finished.

References getTargetOrientation().

Referenced by writeObjectToFile().

◆ getLookAt()

ConversationPlaybackLookAt Dragengine.Scenery.BAAAlignActor.getLookAt ( )

Conversation look-at.

Referenced by resetPlayerInput().

◆ getRelativeTargetElement()

Element Dragengine.Scenery.BAAAlignActor.getRelativeTargetElement ( )

Relative target element.

References new().

Referenced by activate().

◆ getTargetLookVertical()

float Dragengine.Scenery.BAAAlignActor.getTargetLookVertical ( )

Target looking up-down.

Referenced by think().

◆ getTargetOrientation()

float Dragengine.Scenery.BAAAlignActor.getTargetOrientation ( )

Target orientation.

Referenced by getCallAIFinished().

◆ getTargetPosition()

DVector Dragengine.Scenery.BAAAlignActor.getTargetPosition ( )

Target position.

References new().

Referenced by setActionSucceeded().

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

References Dragengine.Scenery.BaseActorAction.getLocomotion(), Dragengine.Scenery.BaseActorAction.locomotion, and setTargetFromLocomotion().

Referenced by writeObjectToFile().

◆ new() [1/3]

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

Create align actor action.

Parameters
succeededAction to switch to if aligning finished or failed.

References new().

Referenced by colliderChanged(), getRelativeTargetElement(), getTargetPosition(), new(), new(), setLookAt(), setTarget(), setTargetOrientation(), setTargetPosition(), and writeObjectToFile().

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

References new().

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

Referenced by writeObjectToFile().

◆ resetPlayerInput()

void Dragengine.Scenery.BAAAlignActor.resetPlayerInput ( )
protected

Reset player input.

References getLookAt().

Referenced by writeObjectToFile().

◆ setActionFailed()

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

Set action to switch to if aligning failed.

Referenced by writeObjectToFile().

◆ setActionSucceeded()

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

Set action to switch to if aligning succeeded.

References getTargetPosition().

Referenced by colliderChanged().

◆ setCallAIFinished()

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

Set if aiFinished() is called if aligning finished.

References setTargetOrientation().

Referenced by writeObjectToFile().

◆ setLookAt()

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

Set conversation look-at.

References new().

Referenced by canHitCollider(), and writeObjectToFile().

◆ setRelativeTargetElement()

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

Set relative target position.

Referenced by deactivate(), enterFrame(), and writeObjectToFile().

◆ setTarget()

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

Set target.

References new().

Referenced by enterFrame().

◆ setTargetFromLocomotion()

void Dragengine.Scenery.BAAAlignActor.setTargetFromLocomotion ( )

Set target from locomotion.

Referenced by initBehaviors().

◆ setTargetLookVertical()

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

Set target looking up-down.

Referenced by think(), and writeObjectToFile().

◆ setTargetOrientation() [1/2]

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

Set target orientation.

References new().

◆ setTargetOrientation() [2/2]

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

Set target orientation.

Referenced by enterFrame(), setCallAIFinished(), and writeObjectToFile().

◆ setTargetPosition()

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

Set target position.

References new().

Referenced by enterFrame(), getActionFailed(), and writeObjectToFile().

◆ startAligningActor()

void Dragengine.Scenery.BAAAlignActor.startAligningActor ( )
protected

Start aligning actor.

Referenced by writeObjectToFile().

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

References getTargetLookVertical(), and setTargetLookVertical().

Referenced by writeObjectToFile().

◆ writeObjectToFile()

Member Data Documentation

◆ actorMover

ECBehaviorActorMover.Instance Dragengine.Scenery.BAAAlignActor.actorMover
protected

Actor mover behavior.

Referenced by writeObjectToFile().

◆ alignActor

ECBehaviorAlignActor.Instance Dragengine.Scenery.BAAAlignActor.alignActor
protected

Align actor behavior.

Referenced by writeObjectToFile().

◆ playerInputCrouch

ECBehaviorPlayerInputCrouch.Instance Dragengine.Scenery.BAAAlignActor.playerInputCrouch
protected

Player input crouching behavior.

Referenced by writeObjectToFile().

◆ playerInputLook

ECBehaviorPlayerInputLook.Instance Dragengine.Scenery.BAAAlignActor.playerInputLook
protected

Player input looking around behavior.

Referenced by writeObjectToFile().

◆ playerInputMove

ECBehaviorPlayerInputMove.Instance Dragengine.Scenery.BAAAlignActor.playerInputMove
protected

Player input moving behavior.

Referenced by writeObjectToFile().


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