Drag[en]gine Script Module DragonScript
1.23
|
Base actor action aligning actors using ECBehaviorAlignActor. More...
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... | |
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.
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.
void Dragengine.Scenery.BAAAlignActor.cancel | ( | ) |
Cancel action the next time possible.
Reimplemented from Dragengine.Scenery.BaseActorAction.
Two colliders can hit each other.
Reimplemented from Dragengine.Scenery.BaseActorAction.
void Dragengine.Scenery.BAAAlignActor.colliderChanged | ( | Collider | owner | ) |
Collider changed.
Reimplemented from Dragengine.Scenery.BaseActorAction.
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.
void Dragengine.Scenery.BAAAlignActor.enterFrame | ( | ) |
Actor has been added to game world and enterFrame() is called once.
Reimplemented from Dragengine.Scenery.BaseActorAction.
BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionFailed | ( | ) |
Action to switch to if aligning failed.
BaseActorAction Dragengine.Scenery.BAAAlignActor.getActionSucceeded | ( | ) |
Action to switch to if aligning succeeded.
bool Dragengine.Scenery.BAAAlignActor.getCallAIFinished | ( | ) |
Call aiFinished() if aligning finished.
ConversationPlaybackLookAt Dragengine.Scenery.BAAAlignActor.getLookAt | ( | ) |
Conversation look-at.
Element Dragengine.Scenery.BAAAlignActor.getRelativeTargetElement | ( | ) |
Relative target element.
float Dragengine.Scenery.BAAAlignActor.getTargetLookVertical | ( | ) |
Target looking up-down.
float Dragengine.Scenery.BAAAlignActor.getTargetOrientation | ( | ) |
Target orientation.
DVector Dragengine.Scenery.BAAAlignActor.getTargetPosition | ( | ) |
Target position.
|
protected |
Init behaviors.
Retrieve and store required and optional behavior instances from the actor element.
Reimplemented from Dragengine.Scenery.BaseActorAction.
BAAAlignActor Dragengine.Scenery.BAAAlignActor.new | ( | BaseActorAction | succeeded | ) |
Create align actor action.
succeeded | Action to switch to if aligning finished or failed. |
BAAAlignActor Dragengine.Scenery.BAAAlignActor.new | ( | BaseActorAction | succeeded, |
BaseActorAction | failed | ||
) |
Create align actor action.
succeeded | Action to switch to if aligning succeeded. |
failed | Action to switch to if aligning failed. |
BAAAlignActor Dragengine.Scenery.BAAAlignActor.new | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Create align actor action from persisted state.
Reimplemented from Dragengine.Scenery.BaseActorAction.
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.
|
protected |
Reset player input.
void Dragengine.Scenery.BAAAlignActor.setActionFailed | ( | BaseActorAction | action | ) |
Set action to switch to if aligning failed.
void Dragengine.Scenery.BAAAlignActor.setActionSucceeded | ( | BaseActorAction | action | ) |
Set action to switch to if aligning succeeded.
void Dragengine.Scenery.BAAAlignActor.setCallAIFinished | ( | bool | sendActionFinished | ) |
Set if aiFinished() is called if aligning finished.
void Dragengine.Scenery.BAAAlignActor.setLookAt | ( | ConversationPlaybackLookAt | lookAt | ) |
Set conversation look-at.
void Dragengine.Scenery.BAAAlignActor.setRelativeTargetElement | ( | Element | element | ) |
Set relative target position.
void Dragengine.Scenery.BAAAlignActor.setTarget | ( | Element | element, |
DVector | position, | ||
float | orientation | ||
) |
Set target.
void Dragengine.Scenery.BAAAlignActor.setTargetFromLocomotion | ( | ) |
Set target from locomotion.
void Dragengine.Scenery.BAAAlignActor.setTargetLookVertical | ( | float | lookVertical | ) |
Set target looking up-down.
void Dragengine.Scenery.BAAAlignActor.setTargetOrientation | ( | DVector | targetPosition | ) |
Set target orientation.
void Dragengine.Scenery.BAAAlignActor.setTargetOrientation | ( | float | orientation | ) |
Set target orientation.
void Dragengine.Scenery.BAAAlignActor.setTargetPosition | ( | DVector | position | ) |
Set target position.
|
protected |
Start aligning actor.
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.
void Dragengine.Scenery.BAAAlignActor.writeObjectToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write object to file writer.
Reimplemented from Dragengine.Scenery.BaseActorAction.
|
protected |
Actor mover behavior.
|
protected |
Align actor behavior.
|
protected |
Player input crouching behavior.
|
protected |
Player input looking around behavior.
|
protected |
Player input moving behavior.