Sequine - Scripting API
Calcatz.CookieCutter.Command Class Reference

Base class of all command types. More...

Inheritance diagram for Calcatz.CookieCutter.Command:
Calcatz.CookieCutter.BranchCommand Calcatz.CookieCutter.BuildableCommand Calcatz.CookieCutter.ChangeTimeScaleCommand Calcatz.CookieCutter.CommandCreatorWindow.DummyCommand Calcatz.CookieCutter.PropertyCommand Calcatz.CookieCutter.SetVariableCommand Calcatz.CookieCutter.StickyNoteCommand Calcatz.CookieCutter.TextFormatterCommand Calcatz.CookieCutter.WaitForSecondsCommand Calcatz.Sequine.AudioSourceControlCommand Calcatz.Sequine.LoadSceneAsyncCommand Calcatz.Sequine.LoadSceneCommand Calcatz.Sequine.ModifyTransformCommand Calcatz.Sequine.PlayLoopingSoundCommand Calcatz.Sequine.PlayOneShotSoundCommand Calcatz.Sequine.RunSubFlowAssetCommand Calcatz.Sequine.RunSubFlowComponentCommand Calcatz.Sequine.SequineFlowCommand Calcatz.Sequine.SequineTargetCommand Calcatz.Sequine.SetGlobalVariableCommand Calcatz.Sequine.TextAnimationCommand Calcatz.Sequine.WaitForInput

Classes

class  ConnectionTarget
 

Public Member Functions

virtual int GetNextOutputIndex ()
 Get the output index to get the next command ID upon exiting this command. More...
 
virtual T GetOutput< T > (CommandExecutionFlow _flow, int _pointIndex)
 Get output value at out-point index. More...
 
virtual void SetValue< T > (CommandExecutionFlow _flow, int _outputPointIndex, T _value)
 obsolete More...
 
virtual void Execute (CommandExecutionFlow _flow)
 The process to execute upon visiting the main in-point (white in-point). More...
 
virtual void Validate ()
 Validate() is called when opening the nodes editor (if in Edit Mode), or right before the command execution (if in Play Mode). The main purpose is to adapt or validate any data inside the Command, if its structure had been changed. More...
 
virtual void Editor_InitInPoints ()
 Called when a Command Node is initialized, specifically the in-points. Use this method to ensure inputIds as well. More...
 
virtual void Editor_InitOutPoints ()
 Called when a Command Node is initialized, specifically the out-points. Use this method to ensure nextIds as well. More...
 
virtual void Editor_OnDrawTitle (out string _tooltip)
 Called when a Command Node's title is drawn. Use this to change the tooltip of the command. Also use this to decide whether the Title should draw in-point and/or out-point. More...
 
virtual void Editor_OnDrawContents (Vector2 _absPosition)
 Called when a Command Node is drawn. More...
 

Static Public Member Functions

static ConnectionTarget GetOutConnection (Command _command, int _outPointIndex, Command _targetCommand, int _inPointIndex)
 
static void RemoveNextIdAtConnection (Command _command, int _outPointIndex, Command _targetCommand, int _inPointIndex)
 
static void RemoveInputIdAtConnection (Command _command, int _outPointIndex, Command _targetCommand, int _inPointIndex)
 
static void ChangeNextIdInputIndexAtConnection (Command _command, int _outPointIndex, Command _targetCommand, int _inPointIndex, int _newInPointIndex)
 

Public Attributes

Vector2 nodePosition
 Don't use this in non-editor code More...
 
int id
 
Action onFinished
 
List< List< ConnectionTarget > > nextIds = new List<List<ConnectionTarget>>() { new List<ConnectionTarget>() { new ConnectionTarget() } }
 First: Output point index. Second: Connection line index. More...
 
List< ConnectionTargetinputIds = new List<ConnectionTarget>()
 

Protected Member Functions

virtual T GetInput< T > (CommandExecutionFlow _flow, int _index, T _defaultValue)
 Get input value at in-point index. More...
 
virtual T GetInput< T > (CommandExecutionFlow _flow, int _index)
 Get input value at in-point index. More...
 
void Exit ()
 Exit this command, and continue to next command if available. More...
 
virtual void HandleInterruption ()
 Called when the current flow is force killed, while the currently executed command is exactly this command, and has not exited. Note that "exited" here means that Exit() method has been called. More...
 
void RunSubFlow (CommandExecutionFlow _flow, int _outputIndex)
 Run a flow, starting from the command at output index. More...
 
bool TryGetCommandAtOutputIndex (CommandExecutionFlow _flow, int _outputIndex, out Command _nextCommand)
 Try get the next command at the specified output index. More...
 

Properties

virtual float nodeWidth [get]
 The node width used for the command node. More...
 

Detailed Description

Base class of all command types.

Member Function Documentation

◆ ChangeNextIdInputIndexAtConnection()

static void Calcatz.CookieCutter.Command.ChangeNextIdInputIndexAtConnection ( Command  _command,
int  _outPointIndex,
Command  _targetCommand,
int  _inPointIndex,
int  _newInPointIndex 
)
static

◆ Editor_InitInPoints()

virtual void Calcatz.CookieCutter.Command.Editor_InitInPoints ( )
virtual

Called when a Command Node is initialized, specifically the in-points. Use this method to ensure inputIds as well.

Reimplemented in Calcatz.CookieCutter.CommandCreatorWindow.DummyCommand, Calcatz.CookieCutter.ChangeTimeScaleCommand, Calcatz.CookieCutter.WaitForSecondsCommand, Calcatz.CookieCutter.BoolComparatorCommand, Calcatz.CookieCutter.CastFloatToIntegerCommand, Calcatz.CookieCutter.CastIntegerToFloatCommand, Calcatz.CookieCutter.FloatComparatorCommand, Calcatz.CookieCutter.IntegerComparatorCommand, Calcatz.CookieCutter.OperatorCommand< TValueType >, Calcatz.CookieCutter.StringComparatorCommand, Calcatz.CookieCutter.PropertyCommand, Calcatz.Sequine.PauseAnimationClipAtTimeCommand, Calcatz.Sequine.PauseAnimationClipCommand, Calcatz.Sequine.PlayAnimationClipCommand, Calcatz.Sequine.ResumeAnimationClipCommand, Calcatz.Sequine.AudioSourceControlCommand, Calcatz.Sequine.PlayLoopingSoundCommand, Calcatz.Sequine.PlayOneShotSoundCommand, Calcatz.Sequine.RunSubFlowAssetCommand, Calcatz.Sequine.RunSubFlowComponentCommand, Calcatz.Sequine.WaitForInput, Calcatz.Sequine.LoadSceneAsyncCommand, Calcatz.Sequine.LoadSceneCommand, Calcatz.Sequine.SequineTargetCommand, Calcatz.Sequine.SequineTargetPropertyCommand, Calcatz.Sequine.TextAnimationCommand, Calcatz.Sequine.EulerToQuaternionCommand, Calcatz.Sequine.GetTransformCommand, Calcatz.Sequine.ModifyTransformCommand, Calcatz.Sequine.QuaternionMultipleByVector3Command, Calcatz.Sequine.QuaternionToEulerCommand, Calcatz.Sequine.SetPositionCommand, Calcatz.Sequine.SetRotationCommand, Calcatz.Sequine.SetScaleCommand, Calcatz.Sequine.TransformTweenCommand, Calcatz.Sequine.TweenPositionCommand, Calcatz.Sequine.TweenRotationCommand, Calcatz.Sequine.TweenScaleCommand, Calcatz.Sequine.Vector3DivideByFloatCommand, Calcatz.Sequine.Vector3MultipleByFloatCommand, and Calcatz.Sequine.Vector3OperatorCommand.

◆ Editor_InitOutPoints()

virtual void Calcatz.CookieCutter.Command.Editor_InitOutPoints ( )
virtual

Called when a Command Node is initialized, specifically the out-points. Use this method to ensure nextIds as well.

Reimplemented in Calcatz.CookieCutter.CommandCreatorWindow.DummyCommand, Calcatz.CookieCutter.BoolComparatorCommand, Calcatz.CookieCutter.CastFloatToIntegerCommand, Calcatz.CookieCutter.CastIntegerToFloatCommand, Calcatz.CookieCutter.FloatComparatorCommand, Calcatz.CookieCutter.IntegerComparatorCommand, Calcatz.CookieCutter.OperatorCommand< TValueType >, Calcatz.CookieCutter.StringComparatorCommand, Calcatz.CookieCutter.PropertyCommand, Calcatz.Sequine.GetActionClipCommand, Calcatz.Sequine.SequineAnimationCommand, Calcatz.Sequine.AudioSourceControlCommand, Calcatz.Sequine.PlayLoopingSoundCommand, Calcatz.Sequine.PlayOneShotSoundCommand, Calcatz.Sequine.RunSubFlowAssetCommand, Calcatz.Sequine.RunSubFlowComponentCommand, Calcatz.Sequine.WaitForInput, Calcatz.Sequine.LoadSceneAsyncCommand, Calcatz.Sequine.LoadSceneCommand, Calcatz.Sequine.TextAnimationCommand, Calcatz.Sequine.EulerToQuaternionCommand, Calcatz.Sequine.GetTransformCommand, Calcatz.Sequine.QuaternionMultipleByVector3Command, Calcatz.Sequine.QuaternionToEulerCommand, Calcatz.Sequine.SetPositionCommand, Calcatz.Sequine.SetRotationCommand, Calcatz.Sequine.SetScaleCommand, Calcatz.Sequine.TransformTweenCommand, Calcatz.Sequine.TweenPositionCommand, Calcatz.Sequine.TweenRotationCommand, Calcatz.Sequine.TweenScaleCommand, Calcatz.Sequine.Vector3DivideByFloatCommand, Calcatz.Sequine.Vector3MultipleByFloatCommand, and Calcatz.Sequine.Vector3OperatorCommand.

◆ Editor_OnDrawContents()

virtual void Calcatz.CookieCutter.Command.Editor_OnDrawContents ( Vector2  _absPosition)
virtual

Called when a Command Node is drawn.

Parameters
_absPosition

Reimplemented in Calcatz.CookieCutter.CommandCreatorWindow.DummyCommand, Calcatz.CookieCutter.ChangeTimeScaleCommand, Calcatz.CookieCutter.WaitForSecondsCommand, Calcatz.CookieCutter.BoolComparatorCommand, Calcatz.CookieCutter.CastFloatToIntegerCommand, Calcatz.CookieCutter.CastIntegerToFloatCommand, Calcatz.CookieCutter.FloatComparatorCommand, Calcatz.CookieCutter.IntegerComparatorCommand, Calcatz.CookieCutter.OperatorCommand< TValueType >, Calcatz.CookieCutter.StringComparatorCommand, Calcatz.Sequine.PauseActionAnimationAtTimeCommand, Calcatz.Sequine.PauseActionAnimationCommand, Calcatz.Sequine.PauseAnimationClipAtTimeCommand, Calcatz.Sequine.PauseAnimationClipCommand, Calcatz.Sequine.ResumeActionAnimationCommand, Calcatz.Sequine.ResumeAnimationClipCommand, Calcatz.Sequine.GetActionClipCommand, Calcatz.Sequine.SequineAnimationCommand, Calcatz.Sequine.AudioSourceControlCommand, Calcatz.Sequine.PlayLoopingSoundCommand, Calcatz.Sequine.PlayOneShotSoundCommand, Calcatz.Sequine.RunSubFlowAssetCommand, Calcatz.Sequine.RunSubFlowComponentCommand, Calcatz.Sequine.WaitForInput, Calcatz.Sequine.LoadSceneAsyncCommand, Calcatz.Sequine.LoadSceneCommand, Calcatz.Sequine.SequineTargetCommand, Calcatz.Sequine.SequineTargetPropertyCommand, Calcatz.Sequine.TextAnimationCommand, Calcatz.Sequine.EulerToQuaternionCommand, Calcatz.Sequine.GetTransformCommand, Calcatz.Sequine.ModifyTransformCommand, Calcatz.Sequine.QuaternionMultipleByVector3Command, Calcatz.Sequine.QuaternionToEulerCommand, Calcatz.Sequine.SetPositionCommand, Calcatz.Sequine.SetRotationCommand, Calcatz.Sequine.SetScaleCommand, Calcatz.Sequine.TransformTweenCommand, Calcatz.Sequine.TweenPositionCommand, Calcatz.Sequine.TweenRotationCommand, Calcatz.Sequine.TweenScaleCommand, Calcatz.Sequine.Vector3DivideByFloatCommand, Calcatz.Sequine.Vector3MultipleByFloatCommand, and Calcatz.Sequine.Vector3OperatorCommand.

◆ Editor_OnDrawTitle()

◆ Execute()

virtual void Calcatz.CookieCutter.Command.Execute ( CommandExecutionFlow  _flow)
virtual

The process to execute upon visiting the main in-point (white in-point).

Parameters
_flow

Reimplemented in Calcatz.CookieCutter.BranchCommand, Calcatz.CookieCutter.ChangeTimeScaleCommand, Calcatz.CookieCutter.ExampleBuildableCommand, Calcatz.CookieCutter.SetVariableCommand, Calcatz.CookieCutter.TextFormatterCommand, Calcatz.CookieCutter.TimelineExtrapolationCommand, Calcatz.CookieCutter.WaitForSecondsCommand, Calcatz.Sequine.PauseActionAnimationAtTimeCommand, Calcatz.Sequine.PauseActionAnimationCommand, Calcatz.Sequine.PauseAnimationClipAtTimeCommand, Calcatz.Sequine.PauseAnimationClipCommand, Calcatz.Sequine.PlayActionAnimationCommand, Calcatz.Sequine.PlayActionAnimationWithTranslationCommand, Calcatz.Sequine.PlayAnimationClipCommand, Calcatz.Sequine.ResumeActionAnimationCommand, Calcatz.Sequine.ResumeAnimationClipCommand, Calcatz.Sequine.PauseSequinePlayerCommand, Calcatz.Sequine.ResumeSequinePlayerCommand, Calcatz.Sequine.AudioSourceControlCommand, Calcatz.Sequine.PlayAmbienceCommand, Calcatz.Sequine.PlayAmbienceFromLibraryCommand, Calcatz.Sequine.PlayAudioClipCommand, Calcatz.Sequine.BGMControlCommand, Calcatz.Sequine.PlayBGMFromLibraryCommand, Calcatz.Sequine.PlayMEFromLibraryCommand, Calcatz.Sequine.PlaySFXFromLibraryCommand, Calcatz.Sequine.RunSubFlowAssetCommand, Calcatz.Sequine.RunSubFlowComponentCommand, Calcatz.Sequine.WaitForInput, Calcatz.Sequine.LoadSceneAsyncCommand, Calcatz.Sequine.LoadSceneCommand, Calcatz.Sequine.TextAnimationCommand, Calcatz.Sequine.SetPositionCommand, Calcatz.Sequine.SetRotationCommand, Calcatz.Sequine.SetScaleCommand, Calcatz.Sequine.TransformTweenCommand, Calcatz.Sequine.TweenPositionCommand, Calcatz.Sequine.TweenRotationCommand, Calcatz.Sequine.TweenScaleCommand, and Calcatz.Sequine.SetGlobalVariableCommand.

◆ Exit()

void Calcatz.CookieCutter.Command.Exit ( )
protected

Exit this command, and continue to next command if available.

◆ GetInput< T >() [1/2]

virtual T Calcatz.CookieCutter.Command.GetInput< T > ( CommandExecutionFlow  _flow,
int  _index 
)
protectedvirtual

Get input value at in-point index.

Template Parameters
TThe expected value type
Parameters
_flow
_index
Returns
The input value in T

Reimplemented in Calcatz.CookieCutter.BuildableCommand, and Calcatz.CookieCutter.BuildablePropertyCommand.

◆ GetInput< T >() [2/2]

virtual T Calcatz.CookieCutter.Command.GetInput< T > ( CommandExecutionFlow  _flow,
int  _index,
_defaultValue 
)
protectedvirtual

Get input value at in-point index.

Template Parameters
TThe expected value type
Parameters
_flow
_index
_defaultValue
Returns
The input value in T

Reimplemented in Calcatz.CookieCutter.BuildableCommand, and Calcatz.CookieCutter.BuildablePropertyCommand.

◆ GetNextOutputIndex()

virtual int Calcatz.CookieCutter.Command.GetNextOutputIndex ( )
virtual

Get the output index to get the next command ID upon exiting this command.

Returns

Reimplemented in Calcatz.CookieCutter.BranchCommand, and Calcatz.CookieCutter.BuildableCommand.

◆ GetOutConnection()

static ConnectionTarget Calcatz.CookieCutter.Command.GetOutConnection ( Command  _command,
int  _outPointIndex,
Command  _targetCommand,
int  _inPointIndex 
)
static

◆ GetOutput< T >()

virtual T Calcatz.CookieCutter.Command.GetOutput< T > ( CommandExecutionFlow  _flow,
int  _pointIndex 
)
virtual

Get output value at out-point index.

Template Parameters
TThe expected value type
Parameters
_flow
_pointIndex
Returns
The output value in T

Reimplemented in Calcatz.CookieCutter.BuildableCommand, Calcatz.CookieCutter.BuildablePropertyCommand, Calcatz.CookieCutter.SetVariableCommand, Calcatz.CookieCutter.CrossSceneComponentCommand, Calcatz.CookieCutter.AndCommand, Calcatz.CookieCutter.CastFloatToIntegerCommand, Calcatz.CookieCutter.CastIntegerToFloatCommand, Calcatz.CookieCutter.FloatComparatorCommand, Calcatz.CookieCutter.IntegerComparatorCommand, Calcatz.CookieCutter.OperatorCommand< TValueType >, Calcatz.CookieCutter.OrCommand, Calcatz.CookieCutter.StringComparatorCommand, Calcatz.CookieCutter.StringFormatterCommand, Calcatz.CookieCutter.RandomObjectSelectorCommand, Calcatz.CookieCutter.VariableCommand, Calcatz.Sequine.GetActionClipCommand, Calcatz.Sequine.SequineAnimationCommand, Calcatz.Sequine.LoadSceneAsyncCommand, Calcatz.Sequine.TextAnimationCommand, Calcatz.Sequine.EulerToQuaternionCommand, Calcatz.Sequine.GetTransformCommand, Calcatz.Sequine.QuaternionMultipleByVector3Command, Calcatz.Sequine.QuaternionToEulerCommand, Calcatz.Sequine.SetPositionCommand, Calcatz.Sequine.SetRotationCommand, Calcatz.Sequine.SetScaleCommand, Calcatz.Sequine.TweenPositionCommand, Calcatz.Sequine.TweenRotationCommand, Calcatz.Sequine.TweenScaleCommand, Calcatz.Sequine.Vector3DivideByFloatCommand, Calcatz.Sequine.Vector3MultipleByFloatCommand, Calcatz.Sequine.Vector3OperatorCommand, Calcatz.Sequine.GetGlobalVariableCommand, and Calcatz.Sequine.SetGlobalVariableCommand.

◆ HandleInterruption()

virtual void Calcatz.CookieCutter.Command.HandleInterruption ( )
protectedvirtual

Called when the current flow is force killed, while the currently executed command is exactly this command, and has not exited. Note that "exited" here means that Exit() method has been called.

◆ RemoveInputIdAtConnection()

static void Calcatz.CookieCutter.Command.RemoveInputIdAtConnection ( Command  _command,
int  _outPointIndex,
Command  _targetCommand,
int  _inPointIndex 
)
static

◆ RemoveNextIdAtConnection()

static void Calcatz.CookieCutter.Command.RemoveNextIdAtConnection ( Command  _command,
int  _outPointIndex,
Command  _targetCommand,
int  _inPointIndex 
)
static

◆ RunSubFlow()

void Calcatz.CookieCutter.Command.RunSubFlow ( CommandExecutionFlow  _flow,
int  _outputIndex 
)
protected

Run a flow, starting from the command at output index.

Parameters
_flow
_outputIndex

◆ SetValue< T >()

virtual void Calcatz.CookieCutter.Command.SetValue< T > ( CommandExecutionFlow  _flow,
int  _outputPointIndex,
_value 
)
virtual

obsolete

Template Parameters
T
Parameters
_flow
_outputPointIndex
_value

Reimplemented in Calcatz.CookieCutter.SetVariableCommand, Calcatz.CookieCutter.VariableCommand, and Calcatz.Sequine.SetGlobalVariableCommand.

◆ TryGetCommandAtOutputIndex()

bool Calcatz.CookieCutter.Command.TryGetCommandAtOutputIndex ( CommandExecutionFlow  _flow,
int  _outputIndex,
out Command  _nextCommand 
)
protected

Try get the next command at the specified output index.

Parameters
_flow
_outputIndex
_nextCommand
Returns

◆ Validate()

virtual void Calcatz.CookieCutter.Command.Validate ( )
virtual

Validate() is called when opening the nodes editor (if in Edit Mode), or right before the command execution (if in Play Mode). The main purpose is to adapt or validate any data inside the Command, if its structure had been changed.

Member Data Documentation

◆ id

int Calcatz.CookieCutter.Command.id

◆ inputIds

List<ConnectionTarget> Calcatz.CookieCutter.Command.inputIds = new List<ConnectionTarget>()

◆ nextIds

List<List<ConnectionTarget> > Calcatz.CookieCutter.Command.nextIds = new List<List<ConnectionTarget>>() { new List<ConnectionTarget>() { new ConnectionTarget() } }

First: Output point index. Second: Connection line index.

◆ nodePosition

Vector2 Calcatz.CookieCutter.Command.nodePosition

Don't use this in non-editor code

◆ onFinished

Action Calcatz.CookieCutter.Command.onFinished

Property Documentation

◆ nodeWidth

virtual float Calcatz.CookieCutter.Command.nodeWidth
get

The node width used for the command node.