Drag[en]gine Script Module DragonScript
1.21
|
Play back conversation. More...
Public Member Functions | |
void | addActor (ConversationActor actor, StringID alias) |
Add actor with alias if absent. More... | |
void | addCoordSystem (ConversationCoordSystem coordSystem, StringID alias) |
Add coordinate system with alias if absent. More... | |
void | addListener (ConversationPlaybackListener listener) |
Add listener. More... | |
void | changeMusic (String music) |
Switch music. More... | |
bool | conditionGameCommand (String command) |
Game condition command send by the conversation script. More... | |
void | dispose () |
Dispose of conversation playback. More... | |
void | forEachCoordSystem (Block ablock) |
Visit coordinate systems with block with parameter ConversationCoordSystem. More... | |
ConversationActor | getActorAt (int index) |
Actor by index. More... | |
int | getActorCount () |
Number of actors. More... | |
ConversationActor | getActorMatching (StringID id) |
Actor with ID or number or null if absent. More... | |
ConversationCameraDirector | getCameraDirector () |
Camera director or null. More... | |
ConversationCoordSystem | getCoordSystemByID (StringID id) |
Coordinate system with ID or <em null if absent. More... | |
int | getCoordSystemCount () |
Number of coordinate systems. More... | |
float | getElapsedActionWaiting () |
Elapsed action waiting time in seconds. More... | |
bool | getEnableFastForwardSpeaking () |
Enabling calling fastForwardSpeaking() to be allowed. More... | |
ConversationAction | getNextAction () |
Next action or null if top layer is finished. More... | |
bool | getPaused () |
Playback is paused. More... | |
ConversationPlaybackPlayerChoice | getPlayerChoice () |
Player choice interface or null. More... | |
bool | getRunning () |
Playback is running. More... | |
ConversationPlaybackSubTitle | getSubTitle () |
Sub title or null. More... | |
ConversationTopic | getTopic () |
Topic being talking about. More... | |
ConversationTopicGroup | getTopicGroup () |
Topic group being talking about. More... | |
ConversationPlaybackLayer | getTopLayer () |
Top layer. More... | |
TranslationManager | getTranslationManager () |
Translation manager or null. More... | |
int | getVariable (String name, int defaultValue) |
Variable value or default value if not set. More... | |
bool | getWaitingForAction () |
Waiting for action to begin. More... | |
bool | hasNextAction () |
Next action is present. More... | |
bool | hasVariable (String name) |
Variable is set. More... | |
ConversationPlayback | new (Conversation conversation) |
Create conversation playback. More... | |
ConversationPlayback | new (PersistencyEnvironment env, FileReader reader) |
Read from file. More... | |
void | notifyRunningChanged () |
Notify listeners running state changed. More... | |
void | onConversationStarted () |
Conversation started hook method. More... | |
void | onConversationStopped () |
Conversation stopped hook method. More... | |
String | persistencyFactoryName () |
Name of PersistencyFactory required to load object from file. More... | |
void | popLayer () |
Pop top layer off stack. More... | |
void | processActions (float elapsed, bool skipDelay) |
Process actions. More... | |
void | pushLayer (ConversationPlaybackLayer layer) |
Push layer to top of stack. More... | |
void | readDelayedFromFile (PersistencyEnvironment env, FileReader reader) |
Read data from file accessing subclass implemented methods. More... | |
void | removeActor (ConversationActor actor) |
Remove actor if present. More... | |
void | removeAllActors () |
Remove all actors. More... | |
void | removeAllCoordSystems () |
Remove all coordinate systems. More... | |
void | removeAllLayers () |
Remove all layers. More... | |
void | removeAllVariables () |
Remove all variables. More... | |
void | removeCoordSystem (ConversationCoordSystem coordSystem) |
Remove coordinate system if present. More... | |
void | removeListener (ConversationPlaybackListener listener) |
Remove listener if present. More... | |
void | removeVariable (String name) |
Remove variable if set. More... | |
void | setCameraDirector (ConversationCameraDirector director) |
Set camera director or null. More... | |
void | setEnableFastForwardSpeaking (bool enable) |
Set if calling fastForwardSpeaking() is allowed. More... | |
void | setPaused (bool paused) |
Set if playback is paused. More... | |
void | setPlayerChoice (ConversationPlaybackPlayerChoice playerChoice) |
Set player choice interface or null. More... | |
void | setRunning (bool running) |
Set if playback is running. More... | |
void | setSubTitle (ConversationPlaybackSubTitle subTitle) |
Set sub title or null. More... | |
void | setTopic (ConversationTopicGroup group, ConversationTopic topic) |
Set topic to talk about. More... | |
void | setTranslationManager (TranslationManager translationManager) |
Set translation manager or null. More... | |
void | setVariable (String name, int value) |
Set variable. More... | |
void | stopConversation () |
Stop conversation. More... | |
void | update (float elapsed) |
Update playback. More... | |
void | writeObjectConstructToFile (PersistencyEnvironment env, FileWriter writer) |
Write object data to file writer read during construction time. More... | |
void | writeObjectToFile (PersistencyEnvironment env, FileWriter writer) |
Write object to file writer. More... | |
Play back conversation.
void Dragengine.ConversationSystem.ConversationPlayback.addActor | ( | ConversationActor | actor, |
StringID | alias | ||
) |
Add actor with alias if absent.
void Dragengine.ConversationSystem.ConversationPlayback.addCoordSystem | ( | ConversationCoordSystem | coordSystem, |
StringID | alias | ||
) |
Add coordinate system with alias if absent.
void Dragengine.ConversationSystem.ConversationPlayback.addListener | ( | ConversationPlaybackListener | listener | ) |
Add listener.
void Dragengine.ConversationSystem.ConversationPlayback.changeMusic | ( | String | music | ) |
Switch music.
Overwrite to make the game change music. The default implementation does nothing.
bool Dragengine.ConversationSystem.ConversationPlayback.conditionGameCommand | ( | String | command | ) |
Game condition command send by the conversation script.
Overwrite to make the game evaluate the command returning true or false as result. The default implementation returns false.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
void Dragengine.ConversationSystem.ConversationPlayback.dispose | ( | ) |
Dispose of conversation playback.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
void Dragengine.ConversationSystem.ConversationPlayback.forEachCoordSystem | ( | Block | ablock | ) |
Visit coordinate systems with block with parameter ConversationCoordSystem.
ConversationActor Dragengine.ConversationSystem.ConversationPlayback.getActorAt | ( | int | index | ) |
Actor by index.
int Dragengine.ConversationSystem.ConversationPlayback.getActorCount | ( | ) |
Number of actors.
ConversationActor Dragengine.ConversationSystem.ConversationPlayback.getActorMatching | ( | StringID | id | ) |
Actor with ID or number or null if absent.
ConversationCameraDirector Dragengine.ConversationSystem.ConversationPlayback.getCameraDirector | ( | ) |
Camera director or null.
ConversationCoordSystem Dragengine.ConversationSystem.ConversationPlayback.getCoordSystemByID | ( | StringID | id | ) |
Coordinate system with ID or <em null if absent.
int Dragengine.ConversationSystem.ConversationPlayback.getCoordSystemCount | ( | ) |
Number of coordinate systems.
float Dragengine.ConversationSystem.ConversationPlayback.getElapsedActionWaiting | ( | ) |
Elapsed action waiting time in seconds.
bool Dragengine.ConversationSystem.ConversationPlayback.getEnableFastForwardSpeaking | ( | ) |
Enabling calling fastForwardSpeaking() to be allowed.
ConversationAction Dragengine.ConversationSystem.ConversationPlayback.getNextAction | ( | ) |
Next action or null if top layer is finished.
bool Dragengine.ConversationSystem.ConversationPlayback.getPaused | ( | ) |
Playback is paused.
ConversationPlaybackPlayerChoice Dragengine.ConversationSystem.ConversationPlayback.getPlayerChoice | ( | ) |
Player choice interface or null.
bool Dragengine.ConversationSystem.ConversationPlayback.getRunning | ( | ) |
Playback is running.
ConversationPlaybackSubTitle Dragengine.ConversationSystem.ConversationPlayback.getSubTitle | ( | ) |
Sub title or null.
ConversationTopic Dragengine.ConversationSystem.ConversationPlayback.getTopic | ( | ) |
Topic being talking about.
ConversationTopicGroup Dragengine.ConversationSystem.ConversationPlayback.getTopicGroup | ( | ) |
Topic group being talking about.
ConversationPlaybackLayer Dragengine.ConversationSystem.ConversationPlayback.getTopLayer | ( | ) |
Top layer.
TranslationManager Dragengine.ConversationSystem.ConversationPlayback.getTranslationManager | ( | ) |
Translation manager or null.
int Dragengine.ConversationSystem.ConversationPlayback.getVariable | ( | String | name, |
int | defaultValue | ||
) |
Variable value or default value if not set.
bool Dragengine.ConversationSystem.ConversationPlayback.getWaitingForAction | ( | ) |
Waiting for action to begin.
bool Dragengine.ConversationSystem.ConversationPlayback.hasNextAction | ( | ) |
Next action is present.
bool Dragengine.ConversationSystem.ConversationPlayback.hasVariable | ( | String | name | ) |
Variable is set.
ConversationPlayback Dragengine.ConversationSystem.ConversationPlayback.new | ( | Conversation | conversation | ) |
Create conversation playback.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
ConversationPlayback Dragengine.ConversationSystem.ConversationPlayback.new | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read from file.
This call loads only data not accessing subclass implemented methods. To finish loading call readDelayedFromFile().
The typical factory call would look like this:
These objects are not persisted. Subclass is responsible to set them.
Subclass is usually not required to store additional data except initializing the above mentioned.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
void Dragengine.ConversationSystem.ConversationPlayback.notifyRunningChanged | ( | ) |
Notify listeners running state changed.
void Dragengine.ConversationSystem.ConversationPlayback.onConversationStarted | ( | ) |
Conversation started hook method.
Called if running state changed to true after sending notifications to listeners.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
void Dragengine.ConversationSystem.ConversationPlayback.onConversationStopped | ( | ) |
Conversation stopped hook method.
Called if running state changed to false after sending notifications to listeners.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
String Dragengine.ConversationSystem.ConversationPlayback.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.
Implements Dragengine.LoadSave.Persistable.
Reimplemented in Dragengine.ConversationSystem.BaseConversationPlayback.
void Dragengine.ConversationSystem.ConversationPlayback.popLayer | ( | ) |
Pop top layer off stack.
void Dragengine.ConversationSystem.ConversationPlayback.processActions | ( | float | elapsed, |
bool | skipDelay | ||
) |
Process actions.
void Dragengine.ConversationSystem.ConversationPlayback.pushLayer | ( | ConversationPlaybackLayer | layer | ) |
Push layer to top of stack.
void Dragengine.ConversationSystem.ConversationPlayback.readDelayedFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read data from file accessing subclass implemented methods.
Call after subclass is properly constructed. Subclass usually does not require to overwrite this method.
void Dragengine.ConversationSystem.ConversationPlayback.removeActor | ( | ConversationActor | actor | ) |
Remove actor if present.
void Dragengine.ConversationSystem.ConversationPlayback.removeAllActors | ( | ) |
Remove all actors.
void Dragengine.ConversationSystem.ConversationPlayback.removeAllCoordSystems | ( | ) |
Remove all coordinate systems.
void Dragengine.ConversationSystem.ConversationPlayback.removeAllLayers | ( | ) |
Remove all layers.
void Dragengine.ConversationSystem.ConversationPlayback.removeAllVariables | ( | ) |
Remove all variables.
void Dragengine.ConversationSystem.ConversationPlayback.removeCoordSystem | ( | ConversationCoordSystem | coordSystem | ) |
Remove coordinate system if present.
void Dragengine.ConversationSystem.ConversationPlayback.removeListener | ( | ConversationPlaybackListener | listener | ) |
Remove listener if present.
void Dragengine.ConversationSystem.ConversationPlayback.removeVariable | ( | String | name | ) |
Remove variable if set.
void Dragengine.ConversationSystem.ConversationPlayback.setCameraDirector | ( | ConversationCameraDirector | director | ) |
Set camera director or null.
void Dragengine.ConversationSystem.ConversationPlayback.setEnableFastForwardSpeaking | ( | bool | enable | ) |
Set if calling fastForwardSpeaking() is allowed.
void Dragengine.ConversationSystem.ConversationPlayback.setPaused | ( | bool | paused | ) |
Set if playback is paused.
void Dragengine.ConversationSystem.ConversationPlayback.setPlayerChoice | ( | ConversationPlaybackPlayerChoice | playerChoice | ) |
Set player choice interface or null.
void Dragengine.ConversationSystem.ConversationPlayback.setRunning | ( | bool | running | ) |
Set if playback is running.
void Dragengine.ConversationSystem.ConversationPlayback.setSubTitle | ( | ConversationPlaybackSubTitle | subTitle | ) |
Set sub title or null.
void Dragengine.ConversationSystem.ConversationPlayback.setTopic | ( | ConversationTopicGroup | group, |
ConversationTopic | topic | ||
) |
Set topic to talk about.
void Dragengine.ConversationSystem.ConversationPlayback.setTranslationManager | ( | TranslationManager | translationManager | ) |
Set translation manager or null.
void Dragengine.ConversationSystem.ConversationPlayback.setVariable | ( | String | name, |
int | value | ||
) |
Set variable.
void Dragengine.ConversationSystem.ConversationPlayback.stopConversation | ( | ) |
Stop conversation.
void Dragengine.ConversationSystem.ConversationPlayback.update | ( | float | elapsed | ) |
Update playback.
void Dragengine.ConversationSystem.ConversationPlayback.writeObjectConstructToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write object data to file writer read during construction time.
Writes all data which are read during construction time not accessing subclass implemented methods. This affects besides others the use of loadConversationActor() and createConversationCoordSystem().
Subclass usually does not required to overwrite this method.
void Dragengine.ConversationSystem.ConversationPlayback.writeObjectToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write object to file writer.
This method supports reading object using constructor and readDelayedFromFile(). Subclass has to overwrite writeObjectConstructToFile() and writeObjectDelayedToFile(). This method should not be changed.
Implements Dragengine.LoadSave.Persistable.