Drag[en]gine Script Module DragonScript Script API  1.0
ConversationPlayback Class Reference
Inheritance diagram for ConversationPlayback:

Public Member Functions

void addActor (ConversationActor actor)
 Add actor with no alias if absent. More...
 
void addActor (ConversationActor actor, StringID alias)
 Add actor with alias if absent. More...
 
void addCoordSystem (ConversationCoordSystem coordSystem)
 Add coordinate system without alias if absent. More...
 
void addCoordSystem (ConversationCoordSystem coordSystem, StringID alias)
 Add coordinate system with alias if absent. More...
 
void addListener (ConversationPlaybackListener listener)
 
void advanceToNextAction ()
 
void cancelLoopingAction ()
 
bool conditionGameCommand (String command)
 
ConversationCoordSystem createConversationCoordSystem (StringID id)
 
void dispose ()
 
void fastForwardSpeaking ()
 
void forEachActor (Block aBlock)
 
void forEachCoordSystem (Block aBlock)
 
void gameCommand (String command)
 
ConversationActor getActorAt (int index)
 
int getActorCount ()
 
ConversationActor getActorMatching (StringID id, int number)
 
ConversationCameraDirector getCameraDirector ()
 
Conversation getConversation ()
 
ConversationCoordSystem getCoordSystemByID (StringID id)
 
int getCoordSystemCount ()
 
int getLayerCount ()
 
bool getPaused ()
 
ConversationPlaybackPlayerChoice getPlayerChoice ()
 
bool getRunning ()
 
SubTitleBox getSubTitleBox ()
 
ConversationTopic getTopic ()
 
ConversationTopicGroup getTopicGroup ()
 
ConversationPlaybackLayer getTopLayer ()
 
TSTriggerTable getTriggerTable ()
 
int getVariable (String name, int defaultValue)
 
bool hasNextAction ()
 
bool hasVariable (String name)
 
void hideDoneActorSubTitles ()
 
Animator loadAnimator (String path)
 
Conversation loadConversation (String path)
 
ConversationActor loadConversationActor (StringID id)
 
ConversationPlayback new (Conversation conversation)
 
void notifyRunningChanged ()
 
void popLayer ()
 
void processActions (float elapsed, bool skipDelay)
 
void pushLayer (ConversationPlaybackLayer layer)
 
void readFromFile (FileReader reader)
 
void removeActor (ConversationActor actor)
 
void removeAllActors ()
 
void removeAllCoordSystems ()
 
void removeAllLayers ()
 
void removeAllVariables ()
 
void removeCoordSystem (ConversationCoordSystem coordSystem)
 
void removeListener (ConversationPlaybackListener listener)
 
void removeVariable (String name)
 
void setCameraDirector (ConversationCameraDirector director)
 
void setPaused (bool paused)
 
void setPlayerChoice (ConversationPlaybackPlayerChoice playerChoice)
 
void setRunning (bool running)
 
void setSubTitleBox (SubTitleBox box)
 
void setTopic (ConversationTopicGroup group, ConversationTopic topic)
 
void setVariable (String name, int value)
 
void stopConversation ()
 
void update (float elapsed)
 
void writeToFile (FileWriter writer)
 

Detailed Description

Plays back a conversation.

Author
Roland Pl├╝ss
Version
1.0

Member Function Documentation

§ addActor() [1/2]

void addActor ( ConversationActor  actor)

Add actor with no alias if absent.

§ addActor() [2/2]

void addActor ( ConversationActor  actor,
StringID  alias 
)

Add actor with alias if absent.

§ addCoordSystem() [1/2]

void addCoordSystem ( ConversationCoordSystem  coordSystem)

Add coordinate system without alias if absent.

§ addCoordSystem() [2/2]

void addCoordSystem ( ConversationCoordSystem  coordSystem,
StringID  alias 
)

Add coordinate system with alias if absent.

§ addListener()

void addListener ( ConversationPlaybackListener  listener)

Adds a listener.

§ advanceToNextAction()

void advanceToNextAction ( )

Advance to next action.

§ cancelLoopingAction()

void cancelLoopingAction ( )

Cancel looping action.

§ conditionGameCommand()

bool conditionGameCommand ( String  command)

Game condition command send by the conversation script. Overload to make the game evaluate the command returning true or false as result. The default implementation returns false.

§ createConversationCoordSystem()

ConversationCoordSystem createConversationCoordSystem ( StringID  id)

Create coordinate system for a conversation identifier. This is used by readFromFile to add coordinate system for playing back the conversation. Subclass to create the coordinate system matching a conversation identifier.

§ dispose()

void dispose ( )

Dispose of the conversation playback.

§ fastForwardSpeaking()

void fastForwardSpeaking ( )

Fast forward until the actor stopped speaking.

§ forEachActor()

void forEachActor ( Block  aBlock)

Visit actors.

§ forEachCoordSystem()

void forEachCoordSystem ( Block  aBlock)

Visit coordinate systems.

§ gameCommand()

void gameCommand ( String  command)

Game command send by the conversation script. Overload to make the game execute the action. The default implementation does nothing.

§ getActorAt()

ConversationActor getActorAt ( int  index)

Retrieve an actor by index.

§ getActorCount()

int getActorCount ( )

Retrieves the number of actors.

§ getActorMatching()

ConversationActor getActorMatching ( StringID  id,
int  number 
)

Retrieves the actor with the given ID or number whicher is defined or null if not found.

§ getCameraDirector()

ConversationCameraDirector getCameraDirector ( )

Retrieves the camera director or null to not touch the camera.

§ getConversation()

Conversation getConversation ( )

Retrieves the conversation.

§ getCoordSystemByID()

ConversationCoordSystem getCoordSystemByID ( StringID  id)

Retrieves the coordinate system with the given ID or null if not found.

§ getCoordSystemCount()

int getCoordSystemCount ( )

Retrieves the number of coordinate systems.

§ getLayerCount()

int getLayerCount ( )

Retrieves the number of layers.

§ getPaused()

bool getPaused ( )

Determines if the playback is paused.

§ getPlayerChoice()

ConversationPlaybackPlayerChoice getPlayerChoice ( )

Retrieves the player choice interface or null if not used.

§ getRunning()

bool getRunning ( )

Determines if the playback is running.

§ getSubTitleBox()

SubTitleBox getSubTitleBox ( )

Retrieves the sub title box or null if not used.

§ getTopic()

ConversationTopic getTopic ( )

Retrieves the topic being talking about.

§ getTopicGroup()

ConversationTopicGroup getTopicGroup ( )

Retrieves the topic group being talking about.

§ getTopLayer()

ConversationPlaybackLayer getTopLayer ( )

Retrieves the top layer.

§ getTriggerTable()

TSTriggerTable getTriggerTable ( )

Retrieves the trigger table to use. Subclass to return the trigger table.

§ getVariable()

int getVariable ( String  name,
int  defaultValue 
)

Retrieves the value of a variable or the default value if not found.

§ hasNextAction()

bool hasNextAction ( )

Determines the next action or null if the layer is finished.

§ hasVariable()

bool hasVariable ( String  name)

Determines if a variable is set.

§ hideDoneActorSubTitles()

void hideDoneActorSubTitles ( )

Hide the sub title of all actors done speaking.

§ loadAnimator()

Animator loadAnimator ( String  path)

Load or obtain animator for a path. This is used by the playback objects to obtain the played back animation. Overwrite to load the file for example using a LoadAnimation object.

§ loadConversation()

Conversation loadConversation ( String  path)

Load or obtain conversation script for a path. This is used by readFromFile to obtain the played back conversation. Overwrite to load the file for example using an LoadConversation object.

§ loadConversationActor()

ConversationActor loadConversationActor ( StringID  id)

Obtain actor for a conversation identifier. This is used by readFromFile to add actors for playing back the conversation. Subclass to return the actors matching a conversation identifier.

§ new()

ConversationPlayback new ( Conversation  conversation)

Create a new conversation playback.

§ notifyRunningChanged()

void notifyRunningChanged ( )

Notifies all that the running state changed.

§ popLayer()

void popLayer ( )

Pops the top layer off the stack.

§ processActions()

void processActions ( float  elapsed,
bool  skipDelay 
)

Process actions.

§ pushLayer()

void pushLayer ( ConversationPlaybackLayer  layer)

Pushes a layer to the top of the stack.

§ readFromFile()

void readFromFile ( FileReader  reader)

Read playback from a file.

§ removeActor()

void removeActor ( ConversationActor  actor)

Removes the actor if existing.

§ removeAllActors()

void removeAllActors ( )

Remove all actors.

§ removeAllCoordSystems()

void removeAllCoordSystems ( )

Remove all coordinate systems.

§ removeAllLayers()

void removeAllLayers ( )

Remove all layers.

§ removeAllVariables()

void removeAllVariables ( )

Remove all variables.

§ removeCoordSystem()

void removeCoordSystem ( ConversationCoordSystem  coordSystem)

Removes coordinate system if existing.

§ removeListener()

void removeListener ( ConversationPlaybackListener  listener)

Removes a listener if existing.

§ removeVariable()

void removeVariable ( String  name)

Removes a variable if set.

§ setCameraDirector()

void setCameraDirector ( ConversationCameraDirector  director)

Sets the camera director or null to not touch the camera.

§ setPaused()

void setPaused ( bool  paused)

Sets if the playback is paused.

§ setPlayerChoice()

void setPlayerChoice ( ConversationPlaybackPlayerChoice  playerChoice)

Sets the player choice interface or null if not used.

§ setRunning()

void setRunning ( bool  running)

Sets if the playback is running.

§ setSubTitleBox()

void setSubTitleBox ( SubTitleBox  box)

Sets the sub title box or null if not used.

§ setTopic()

void setTopic ( ConversationTopicGroup  group,
ConversationTopic  topic 
)

Sets the topic to talk about.

§ setVariable()

void setVariable ( String  name,
int  value 
)

Sets a variable.

§ stopConversation()

void stopConversation ( )

Stop conversation.

§ update()

void update ( float  elapsed)

Reset the camera. Update playback.

§ writeToFile()

void writeToFile ( FileWriter  writer)

Write playback to a file.


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