A sequencer plays sequences of commands such as camera cuts, animation, audio, activating game objects, etc. More...
Public Member Functions | |
delegate void | MessageStringDelegate (string message) |
void | UseCamera (Camera sequencerCamera, GameObject cameraAngles) |
void | UseCamera (Camera sequencerCamera, GameObject alternateSequencerCameraObject, GameObject cameraAngles) |
void | SwitchCamera (Camera newCamera) |
Switches the sequencer camera to a different camera object immediately. | |
void | TakeCameraControl () |
Takes control of the camera. | |
void | Open () |
Opens this instance. | |
void | Close () |
Closes and destroy this sequencer. | |
void | OnDestroy () |
void | Update () |
void | SetParticipants (Transform speaker, Transform listener) |
void | PlaySequence (string sequence) |
Parses a sequence string and plays the individual commands. | |
void | PlaySequence (string sequence, bool informParticipants, bool destroyWhenDone) |
void | PlaySequence (string sequence, Transform speaker, Transform listener, bool informParticipants, bool destroyWhenDone) |
void | PlaySequence (string sequence, Transform speaker, Transform listener, bool informParticipants, bool destroyWhenDone, bool delayOneFrame) |
IEnumerator | PlaySequenceAfterOneFrame (string sequence, Transform speaker, Transform listener, bool informParticipants, bool destroyWhenDone) |
void | PlayCommand (string commandName, bool required, float time, string message, string endMessage, params string[] args) |
Schedules a command to be played. | |
void | PlayCommand (QueuedSequencerCommand commandRecord) |
void | PlayCommand (QueuedSequencerCommand commandRecord, string commandName, bool required, float time, string message, string endMessage, params string[] args) |
System.Type | GetTypeFromName (string typeName) |
void | OnSequencerMessage (string message) |
void | Stop () |
Stops all scheduled and active commands. | |
void | StopQueued () |
void | StopActive () |
void | SetDialoguePanel (bool show, bool immediate) |
Static Public Member Functions | |
static void | Message (string message) |
Sends OnSequencerMessage(message) to the Dialogue Manager. | |
static void | RegisterShortcut (string shortcut, string value) |
Registers a sequencer shortcut with the Dialogue System. | |
static void | UnregisterShortcut (string shortcut) |
Unregisters a shortcut from the Dialogue System. | |
static string | ReplaceShortcuts (string sequence) |
static void | Preload () |
static void | SetContinueMode (bool value) |
static void | SetContinueMode (DisplaySettings.SubtitleSettings.ContinueButtonMode mode) |
static void | SetOriginalContinueMode () |
Public Attributes | |
bool | disableInternalSequencerCommands = false |
Set true to disable the internal sequencer commands – for example, if you want to replace them all with your own. | |
Static Public Attributes | |
static bool | reportMissingAudioFiles = false |
static Sequencer | s_awakeSequencer |
SequencerCommand can refer to these if they run in Awake. | |
static string | s_awakeEndMessage |
static Transform | s_awakeSpeaker |
static Transform | s_awakeListener |
static string[] | s_awakeArgs |
Properties | |
bool | isPlaying [get] |
Indicates whether a sequence is currently playing. | |
GameObject | cameraAngles [get] |
Camera | sequencerCamera [get] |
Transform | sequencerCameraTransform [get] |
Transform | speaker [get] |
Transform | listener [get] |
ConversationView | conversationView [get, set] |
Vector3 | originalCameraPosition [get, set] |
Original camera position at start of conversation. | |
Quaternion | originalCameraRotation [get, set] |
Original camera position at start of conversation. | |
float | originalOrthographicSize [get, set] |
Original 2D camera orthographic size at start of conversation. | |
bool | keepCameraPositionOnClose [get, set] |
If true, don't restore camera position to pre-sequence position when sequencer closes. | |
float | subtitleEndTime [get, set] |
The subtitle end time ({{end}}) if playing a dialogue entry sequence. | |
string | entrytag [get, set] |
The entrytag for the current dialogue entry, if playing a dialogue entry sequence. | |
string | entrytaglocal [get] |
Currently language-localized entrytag. | |
ActiveConversationRecord | activeConversationRecord [get, set] |
Active conversation record associated with this sequencer instance. | |
int | numQueuedCommands [get] |
int | numActiveCommands [get] |
static Dictionary< string, string > | shortcuts [get] |
Registered shortcuts: | |
static Dictionary< string, Stack< string > > | shortcutStack [get] |
Stack of values for each shortcut. | |
Events | |
Action | FinishedSequenceHandler = null |
This handler is called when the sequence is done playing. | |
MessageStringDelegate | receivedMessage = null |
A sequencer plays sequences of commands such as camera cuts, animation, audio, activating game objects, etc.
You can use the sequencer to play cutscenes or perform game actions. The dialogue system uses a sequencer to play a sequence for every line of dialogue. If the dialogue author hasn't specified a sequence for a line of dialogue, the dialogue system will generate a basic, default sequence that aims the camera at the speaker.
See also: sequencer
Each sequence command is implemented as a coroutine. You can add new commands by defining subclasses of SequencerCommand.
|
inline |
Closes and destroy this sequencer.
Stops all actions and restores the original camera position.
|
inline |
|
inlinestatic |
Sends OnSequencerMessage(message) to the Dialogue Manager.
Since sequencers are usually on the Dialogue Manager object, this is a convenient way to send a message to all active sequencers. You can use this method if your sequence is waiting for a message.
message | Message to send. |
delegate void PixelCrushers.DialogueSystem.Sequencer.MessageStringDelegate | ( | string | message | ) |
|
inline |
|
inline |
|
inline |
Opens this instance.
Simply resets hasCameraControl.
|
inline |
|
inline |
|
inline |
Schedules a command to be played.
commandName | The command to play. See sequencerCommands for the list of valid commands. |
required | If true , the command will play even if Stop() is called. If this command absolutely must run (for example, setting up the final camera angle at the end of the sequence), set required to true. |
time | The time delay in seconds at which to start the command. If time is 0 , the command starts immediately. |
args | An array of arguments for the command. Pass null if no arguments are required. |
// At the 2 second mark, cut the camera to a closeup of the listener. string[] args = new string[] { "Closeup", "listener" }; Play("Camera", true, 2, args);
|
inline |
Parses a sequence string and plays the individual commands.
sequence | The sequence to play, in the form: |
For example, the sequence below shows a wide angle shot of the speaker reloading and firing, and then cuts to a closeup of the listener.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
Registers a sequencer shortcut with the Dialogue System.
When playing sequences, shortcuts wrapped in double braces are replaced by their values.
shortcut | Shortcut ID |
value | Sequence that replaces the shortcut ID. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Stops all scheduled and active commands.
|
inline |
|
inline |
|
inline |
Switches the sequencer camera to a different camera object immediately.
Restores the previous camera first.
newCamera | New camera. |
|
inline |
Takes control of the camera.
|
inlinestatic |
Unregisters a shortcut from the Dialogue System.
shortcut | Shortcut to remove. |
|
inline |
|
inline |
|
inline |
bool PixelCrushers.DialogueSystem.Sequencer.disableInternalSequencerCommands = false |
Set true
to disable the internal sequencer commands – for example, if you want to replace them all with your own.
|
static |
|
static |
|
static |
|
static |
|
static |
SequencerCommand can refer to these if they run in Awake.
|
static |
|
getset |
Active conversation record associated with this sequencer instance.
|
get |
|
getset |
|
getset |
The entrytag for the current dialogue entry, if playing a dialogue entry sequence.
|
get |
Currently language-localized entrytag.
|
get |
Indicates whether a sequence is currently playing.
The Dialogue System can queue up any number of actions using the Play() method. This property returns true if any actions are scheduled or active.
true
if is playing; otherwise, false
.
|
getset |
If true, don't restore camera position to pre-sequence position when sequencer closes.
|
get |
|
get |
|
get |
|
getset |
Original camera position at start of conversation.
At the end of the conversation, the camera is restored back to this position. You can change this if you want to reset the 'original' position to be elsewhere.
|
getset |
Original camera position at start of conversation.
You can change this if you want to reset the 'original' rotation to be different.
|
getset |
Original 2D camera orthographic size at start of conversation.
You can change this if you want to reset the the 'original' size to be different.
|
get |
|
get |
|
staticget |
Registered shortcuts:
|
staticget |
Stack of values for each shortcut.
If adding a shortcut that already exists, the new value of the shortcut is added to the top of the stack. When removed, it's popped off the stack, revealing the previous value.
|
get |
|
getset |
The subtitle end time ({{end}}) if playing a dialogue entry sequence.
Action PixelCrushers.DialogueSystem.Sequencer.FinishedSequenceHandler = null |
This handler is called when the sequence is done playing.
MessageStringDelegate PixelCrushers.DialogueSystem.Sequencer.receivedMessage = null |