PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand Class Reference

Base class for Sequencer commands. More...

Inherits MonoBehaviour.

Inherited by PixelCrushers.DialogueSystem.SequencerCommands.BaseMasterAudioSequencerCommand, PixelCrushers.DialogueSystem.SequencerCommands.BaseStateMachineSequencerCommand, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAC, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandACCam, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandACSpeech, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAddItem, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAddItem, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAdjustCurrency, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAdjustCurrency, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimation, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimatorFloat, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimatorLayer, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimatorPlayWait, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimatorTimelinePlay, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandARPGAdjustHealth, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandARPGLoadLevel, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandARPGOpenShop, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAudioWait, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAudioWaitOnce, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAudioWWW, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandBehavior, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandBehaviorVariable, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCamera, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCinema, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitAddAttackPoints, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitAddHitPoints, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitDespawnKillable, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitDestroyKillable, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitEndWave, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitFireCustomEvent, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitGameOver, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitGotoWave, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitPauseWave, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitRestartWave, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitSynchroSpawn, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitTakeDamage, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitTemporaryInvincibility, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandCoreGameKitUnpauseWave, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandDelay, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandEyeControl, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandEyes, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandFaceFX, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandFade, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandFSMEvent, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandGameFlow, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandKGFMapIcon, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandLipSync, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandLiveCamera, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandLoadLevel, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandLookAt, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandMoveTo, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandQTE, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandRemoveItem, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandRemoveItem, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandRTVoiceWait, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSALSA, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSetEmotion, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSetOverheadIcon, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSetTimeout, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSLATE, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandSwitchCamera, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandTextInput, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandTPCAbility, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandTPCCameraState, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandTPCControl, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommanduSeq, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandVoice, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandWaitForMessage, PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandWaypoint, and PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandZoom2D.

Collaboration diagram for PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand:

Public Member Functions

void Initialize (Sequencer sequencer, string endMessage, Transform speaker, Transform listener, params string[] parameters)
 Initializes the base properties. More...
 
void Initialize (Sequencer sequencer, Transform speaker, Transform listener, params string[] parameters)
 Initializes the base properties. More...
 

Protected Member Functions

void Stop ()
 Call this method to indicate that the command is done playing. More...
 
Transform GetSubject (string specifier, Transform defaultSubject=null)
 Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera). More...
 
Transform GetSubject (int i, Transform defaultSubject=null)
 Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera). More...
 
string GetParameter (int i, string defaultValue=null)
 Gets the i-th parameter (zero-based). More...
 
GetParameterAs< T > (int i, T defaultValue)
 Gets the i-th parameter (zero-based) as a specified type. More...
 
float GetParameterAsFloat (int i, float defaultValue=0)
 Gets the i-th parameter as a float. More...
 
int GetParameterAsInt (int i, int defaultValue=0)
 Gets the i-th parameter as an int. More...
 
bool GetParameterAsBool (int i, bool defaultValue=false)
 Gets the i-th parameter as a bool. More...
 
string GetParameters ()
 Gets the parameters as a comma-separated string. More...
 
bool IsAudioMuted ()
 Checks whether a Lua variable "Mute" is defined and true. More...
 

Properties

bool IsPlaying [get, protected set]
 Indicates whether the command is still playing. More...
 
Sequencer Sequencer [get]
 Reference to the Sequencer, so you can access its properties such as SequencerCamera and CameraAngles. More...
 
string[] Parameters [get]
 The parameters for the command. More...
 
string endMessage [get]
 Optional message to send the sequencer when the command completes. More...
 
Transform?? speaker [get]
 
Transform?? listener [get]
 

Detailed Description

Base class for Sequencer commands.

Member Function Documentation

◆ GetParameter()

string PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameter ( int  i,
string  defaultValue = null 
)
protected

Gets the i-th parameter (zero-based).

Returns
The i-th parameter, or the specified default value if i is out of range.
Parameters
iThe parameter index number (zero-based).
defaultValueThe default value to return if i is out of range.

◆ GetParameterAs< T >()

T PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameterAs< T > ( int  i,
defaultValue 
)
protected

Gets the i-th parameter (zero-based) as a specified type.

Returns
The i-th parameter as type T, or the specified default value if i is out of range or the parameter can't be converted to type T.
Parameters
iThe parameter index number (zero-based).
defaultValueThe default value to return if i is out of range or the parameter can't be converted to type T.
Template Parameters
TThe type to convert the parameter to.

// Get the second parameter as a float, defaulting to 5f: float duration = GetParameterAs<float>(1, 5f);

◆ GetParameterAsBool()

bool PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameterAsBool ( int  i,
bool  defaultValue = false 
)
protected

Gets the i-th parameter as a bool.

Returns
The parameter as bool, or defaultValue if out of range.
Parameters
iThe zero-based index of the parameter.
defaultValueIf set to true default value.

◆ GetParameterAsFloat()

float PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameterAsFloat ( int  i,
float  defaultValue = 0 
)
protected

Gets the i-th parameter as a float.

Returns
The parameter as float, or defaultValue if out of range.

◆ GetParameterAsInt()

int PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameterAsInt ( int  i,
int  defaultValue = 0 
)
protected

Gets the i-th parameter as an int.

Returns
The parameter as int, or defaultValue if out of range.

◆ GetParameters()

string PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetParameters ( )
protected

Gets the parameters as a comma-separated string.

Returns
The parameters.

◆ GetSubject() [1/2]

Transform PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetSubject ( int  i,
Transform  defaultSubject = null 
)
protected

Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera).

This utility function returns the specified subject.

Returns
The transform of the specified subject, or null if the specifier names a game object that isn't in the scene.
Parameters
iThe parameter index number (zero-based) that names the subject.
defaultSubjectDefault subject (overrides speaker).

◆ GetSubject() [2/2]

Transform PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.GetSubject ( string  specifier,
Transform  defaultSubject = null 
)
protected

Sequencer commands usually specify a subject to which the command applies (e.g., where to aim the camera).

This utility function returns the specified subject.

Returns
The transform of the specified subject, or null if the specifier names a game object that isn't in the scene.
Parameters
specifier"speaker", "listener", or the name of a game object in the scene.
defaultSubjectDefault subject (overrides speaker).

◆ Initialize() [1/2]

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.Initialize ( Sequencer  sequencer,
string  endMessage,
Transform  speaker,
Transform  listener,
params string[]  parameters 
)

Initializes the base properties.

The Sequencer calls this method before handing control to the command.

Parameters
sequencerA reference to the Sequencer.
parametersThe parameters for the command.

◆ Initialize() [2/2]

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.Initialize ( Sequencer  sequencer,
Transform  speaker,
Transform  listener,
params string[]  parameters 
)

Initializes the base properties.

The Sequencer calls this method before handing control to the command.

Parameters
sequencerA reference to the Sequencer.
parametersThe parameters for the command.

◆ IsAudioMuted()

bool PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.IsAudioMuted ( )
protected

Checks whether a Lua variable "Mute" is defined and true.

If so, this indicates that audio should be muted.

Returns
true if audio is muted; otherwise, false.

◆ Stop()

void PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.Stop ( )
protected

Call this method to indicate that the command is done playing.

Property Documentation

◆ endMessage

string PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.endMessage
get

Optional message to send the sequencer when the command completes.

The sequencer sends this message. The command itself is not responsible for sending it.

The end message.

◆ IsPlaying

bool PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.IsPlaying
getprotected set

Indicates whether the command is still playing.

When your custom command is done, it should call Stop() to set this to false.

true if this instance is still playing; otherwise, false.

◆ listener

Transform?? PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.listener
getprotected

◆ Parameters

string [] PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.Parameters
getprotected

The parameters for the command.

The parameters.

◆ Sequencer

Sequencer PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.Sequencer
getprotected

Reference to the Sequencer, so you can access its properties such as SequencerCamera and CameraAngles.

The sequencer.

◆ speaker

Transform?? PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommand.speaker
getprotected

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