|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| bool | canHitCollider (Collider owner, Collider collider) |
| Two colliders can hit each other. | |
| void | colliderChanged (Collider owner) |
| Collider changed. | |
| void | collisionResponse (Collider owner, CollisionInfo info) |
| Collision detected. | |
| BaseActorAction | getAction () |
| Action to switch to if cutscene stopped or null to do nothing. | |
| ECBehaviorActorCutscene.Instance | getActorCutscene () |
| Actor cutscene behavior. | |
| ECBehaviorColliderAI.Instance | getColliderAI () |
| Collider AI behavior. | |
| ECBehaviorProjectToGround.Instance | getProjectToGround () |
| Project to ground behavior. | |
| BAACutscene | new () |
| Create cutscene action. | |
| BAACutscene | new (BaseActorAction action) |
| Create cutscene action switching to another action if cutscene stops. | |
| BAACutscene | new (PersistencyEnvironment env, FileReader reader) |
| Create align actor action from persisted state. | |
| String | persistencyFactoryName () |
| Name of PersistencyFactory required to load object from file. | |
| void | postThink (float elapsed) |
| Post physics. | |
| void | setAction (BaseActorAction action) |
| Set action to switch to if cutscene stopped or null to do nothing. | |
| 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 | cancel () |
| Cancel action the next time possible. | |
| bool | conversationWait () |
| Check if conversation actions have to wait for actor to finish this action. | |
| void | deactivate () |
| Action has been unset as active action in an actor. | |
| void | dispose () |
| Dispose of actor action. | |
| void | enteredGameWorld () |
| Actor entered game world. | |
| void | enterFrame () |
| Actor has been added to game world and enterFrame() is called once. | |
| 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. | |
| 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. | |
Protected Member Functions | |
| void | initBehaviors () |
| Init behaviors. | |
| void | updateAICollider (float elapsed) |
| Update collider. | |
| void | updateLocomotion (float elapsed) |
| Update locomotion. | |
| void | updateLocomotionPost (float elapsed) |
| Post-Update locomotion. | |
| Protected Member Functions inherited from Dragengine.Scenery.BaseActorAction | |
| void | applyAnimations () |
| Apply animations. | |
| void | initAnimator () |
| Initialize animator. | |
| void | updateAnimator (float elapsed) |
| Update animator controllers. | |
Protected Attributes | |
| ECBehaviorActorCutscene.Instance | actorCutscene |
| Actor cutscene behavior. | |
| ECBehaviorColliderAI.Instance | colliderAI |
| Collider AI Behavior. | |
| bool | moveIfColliderChanged |
| Property update actor geometry on collider changed. | |
| ECBehaviorProjectToGround.Instance | projectToGround |
| Project to ground 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. | |
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.
References setAction().
Referenced by initBehaviors().
Two colliders can hit each other.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References colliderAI.
Referenced by writeObjectToFile().
| void Dragengine.Scenery.BAACutscene.colliderChanged | ( | Collider | owner | ) |
Collider changed.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References initBehaviors(), moveIfColliderChanged, and updateLocomotionPost().
Referenced by writeObjectToFile().
| void Dragengine.Scenery.BAACutscene.collisionResponse | ( | Collider | owner, |
| CollisionInfo | info ) |
Collision detected.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References postThink(), and projectToGround.
Referenced by writeObjectToFile().
| BaseActorAction Dragengine.Scenery.BAACutscene.getAction | ( | ) |
Action to switch to if cutscene stopped or null to do nothing.
References moveIfColliderChanged.
Referenced by getProjectToGround().
| ECBehaviorActorCutscene.Instance Dragengine.Scenery.BAACutscene.getActorCutscene | ( | ) |
| ECBehaviorColliderAI.Instance Dragengine.Scenery.BAACutscene.getColliderAI | ( | ) |
Collider AI behavior.
Referenced by think(), and writeObjectToFile().
| ECBehaviorProjectToGround.Instance Dragengine.Scenery.BAACutscene.getProjectToGround | ( | ) |
|
protected |
Init behaviors.
Retrieve and store required and optional behavior instances from the actor element.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References activate(), Dragengine.Scenery.BaseActorAction.getLocomotion(), and Dragengine.Scenery.BaseActorAction.locomotion.
Referenced by colliderChanged().
| BAACutscene Dragengine.Scenery.BAACutscene.new | ( | ) |
Create cutscene action.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References actorCutscene.
Referenced by getActorCutscene(), new(), new(), and setAction().
| BAACutscene Dragengine.Scenery.BAACutscene.new | ( | BaseActorAction | action | ) |
Create cutscene action switching to another action if cutscene stops.
References moveIfColliderChanged, and new().
| BAACutscene Dragengine.Scenery.BAACutscene.new | ( | PersistencyEnvironment | env, |
| FileReader | reader ) |
Create align actor action from persisted state.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References new().
| 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.
References Dragengine.Scenery.BaseActorAction.actor.
Referenced by writeObjectToFile().
| 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.
Referenced by collisionResponse().
| void Dragengine.Scenery.BAACutscene.setAction | ( | BaseActorAction | action | ) |
Set action to switch to if cutscene stopped or null to do nothing.
References new().
Referenced by activate(), and updateLocomotionPost().
| 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.
References actorCutscene, colliderAI, getActorCutscene(), getColliderAI(), getProjectToGround(), and projectToGround.
Referenced by updateLocomotion().
|
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.
Referenced by writeObjectToFile().
|
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.
References moveIfColliderChanged, and think().
Referenced by writeObjectToFile().
|
protected |
Post-Update locomotion.
References actorCutscene, Dragengine.Scenery.BaseActorAction.aiAction, and setAction().
Referenced by colliderChanged(), and writeObjectToFile().
| void Dragengine.Scenery.BAACutscene.writeObjectToFile | ( | PersistencyEnvironment | env, |
| FileWriter | writer ) |
Write object to file writer.
Reimplemented from Dragengine.Scenery.BaseActorAction.
References Dragengine.Scenery.BaseActorAction.actor, actorCutscene, canHitCollider(), colliderAI, colliderChanged(), collisionResponse(), getColliderAI(), getProjectToGround(), Dragengine.Scenery.BaseActorAction.locomotion, moveIfColliderChanged, persistencyFactoryName(), projectToGround, updateAICollider(), updateLocomotion(), updateLocomotionPost(), and writeObjectToFile().
Referenced by writeObjectToFile().
|
protected |
Actor cutscene behavior.
Referenced by new(), think(), updateLocomotionPost(), and writeObjectToFile().
|
protected |
Collider AI Behavior.
Referenced by canHitCollider(), think(), and writeObjectToFile().
|
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.
Referenced by colliderChanged(), getAction(), new(), updateLocomotion(), and writeObjectToFile().
|
protected |
Project to ground behavior.
Referenced by collisionResponse(), think(), and writeObjectToFile().