Drag[en]gine Script Module DragonScript
1.21
|
Base actor action for use with ECBehaviorActorCutscene. 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... | |
bool | canHitCollider (Collider owner, Collider collider) |
Two colliders can hit each other. More... | |
void | colliderChanged (Collider owner) |
Collider changed. More... | |
void | collisionResponse (Collider owner, CollisionInfo info) |
Collision detected. More... | |
BaseActorAction | getAction () |
Action to switch to if cutscene stopped or null to do nothing. More... | |
ECBehaviorActorCutscene.Instance | getActorCutscene () |
Actor cutscene behavior. More... | |
ECBehaviorColliderAI.Instance | getColliderAI () |
Collider AI behavior. More... | |
ECBehaviorProjectToGround.Instance | getProjectToGround () |
Project to ground behavior. More... | |
BAACutscene | new () |
Create cutscene action. More... | |
BAACutscene | new (BaseActorAction action) |
Create cutscene action switching to another action if cutscene stops. More... | |
BAACutscene | 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 | postThink (float elapsed) |
Post physics. More... | |
void | setAction (BaseActorAction action) |
Set action to switch to if cutscene stopped or null to do nothing. 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 | cancel () |
Cancel action the next time possible. More... | |
bool | conversationWait () |
Check if conversation actions have to wait for actor to finish this action. More... | |
void | deactivate () |
Action has been unset as active action in an actor. More... | |
void | dispose () |
Dispose of actor action. More... | |
void | enteredGameWorld () |
Actor entered game world. More... | |
void | enterFrame () |
Actor has been added to game world and enterFrame() is called once. 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... | |
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... | |
Protected Member Functions | |
void | initBehaviors () |
Init behaviors. More... | |
void | updateAICollider (float elapsed) |
Update collider. More... | |
void | updateLocomotion (float elapsed) |
Update locomotion. More... | |
void | updateLocomotionPost (float elapsed) |
Post-Update locomotion. More... | |
Protected Member Functions inherited from Dragengine.Scenery.BaseActorAction | |
void | applyAnimations () |
Apply animations. More... | |
void | initAnimator () |
Initialize animator. More... | |
void | updateAnimator (float elapsed) |
Update animator controllers. More... | |
Protected Attributes | |
ECBehaviorActorCutscene.Instance | actorCutscene |
Actor cutscene behavior. More... | |
ECBehaviorColliderAI.Instance | colliderAI |
Collider AI Behavior. More... | |
bool | moveIfColliderChanged |
Property update actor geometry on collider changed. More... | |
ECBehaviorProjectToGround.Instance | projectToGround |
Project to ground 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 for use with ECBehaviorActorCutscene.
While activate no update are allowed potentially interfering with cutscene handling. Optionally a BaseActorAction can be set to be activated if cutscene is stopped. This allows to play a single cutscene automatically reverting to another action once finished. This only checks if the cutscene is in stopped state at element thinking time. By using this mode you have to start the cutscene before the action has the chance to think or it will immediately switch to the next action. By default no action is set and the BAACutscene action waits until manually switched to anoterh one. This mode of operation is recommended since it is the best to control.
void Dragengine.Scenery.BAACutscene.activate | ( | BehaviorElement | actor | ) |
Action has been set as active action in an actor.
Clears locomotion input to ensure actor is not moving.
Reimplemented from Dragengine.Scenery.BaseActorAction.
Two colliders can hit each other.
Reimplemented from Dragengine.Scenery.BaseActorAction.
void Dragengine.Scenery.BAACutscene.colliderChanged | ( | Collider | owner | ) |
Collider changed.
Reimplemented from Dragengine.Scenery.BaseActorAction.
void Dragengine.Scenery.BAACutscene.collisionResponse | ( | Collider | owner, |
CollisionInfo | info | ||
) |
Collision detected.
Reimplemented from Dragengine.Scenery.BaseActorAction.
BaseActorAction Dragengine.Scenery.BAACutscene.getAction | ( | ) |
Action to switch to if cutscene stopped or null to do nothing.
ECBehaviorActorCutscene.Instance Dragengine.Scenery.BAACutscene.getActorCutscene | ( | ) |
Actor cutscene behavior.
ECBehaviorColliderAI.Instance Dragengine.Scenery.BAACutscene.getColliderAI | ( | ) |
Collider AI behavior.
ECBehaviorProjectToGround.Instance Dragengine.Scenery.BAACutscene.getProjectToGround | ( | ) |
Project to ground behavior.
|
protected |
Init behaviors.
Retrieve and store required and optional behavior instances from the actor element.
Reimplemented from Dragengine.Scenery.BaseActorAction.
BAACutscene Dragengine.Scenery.BAACutscene.new | ( | ) |
Create cutscene action.
Reimplemented from Dragengine.Scenery.BaseActorAction.
BAACutscene Dragengine.Scenery.BAACutscene.new | ( | BaseActorAction | action | ) |
Create cutscene action switching to another action if cutscene stops.
BAACutscene Dragengine.Scenery.BAACutscene.new | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Create align actor action from persisted state.
Reimplemented from Dragengine.Scenery.BaseActorAction.
String Dragengine.Scenery.BAACutscene.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.
void Dragengine.Scenery.BAACutscene.postThink | ( | float | elapsed | ) |
Post physics.
Actor position is updated by ECBehaviorProjectToGround if present in the actor. Otherwise updates the actor element position and orientation from AI collider.
Default implementation does these actions in this order:
Reimplemented from Dragengine.Scenery.BaseActorAction.
void Dragengine.Scenery.BAACutscene.setAction | ( | BaseActorAction | action | ) |
Set action to switch to if cutscene stopped or null to do nothing.
void Dragengine.Scenery.BAACutscene.think | ( | float | elapsed | ) |
Thinking.
If cutscene is stopped and an action is set switches to the action.
Reimplemented from Dragengine.Scenery.BaseActorAction.
|
protected |
Update collider.
Ensures collider is still properly updated although a cutscene is running.
Actor is considered not touching ground if ProjectToGround has not found a ground collider during the last postThink() call.
Reimplemented from Dragengine.Scenery.BaseActorAction.
|
protected |
Update locomotion.
Locomotion is updated to ensure body tilting still works although a cutscene is running. All other input is cancelled during activate so nothing else should happen.
Reimplemented from Dragengine.Scenery.BaseActorAction.
|
protected |
Post-Update locomotion.
void Dragengine.Scenery.BAACutscene.writeObjectToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write object to file writer.
Reimplemented from Dragengine.Scenery.BaseActorAction.
|
protected |
Actor cutscene behavior.
|
protected |
Collider AI Behavior.
|
protected |
Property update actor geometry on collider changed.
For performance reasons updating the actor geometry not done during colliderChanged() but during postThink() when project to ground has been done. Between postThink() and the next elementThink() actor geometry has to be updated or the actor element matrix is out of sync when AI operates on it. This parameter is used to keep track of this.
|
protected |
Project to ground behavior.