Struct TMPSceneCommandWrapper
- Namespace
- TMPEffects.TMPCommands
Struct wrapping either TMPGenericSceneCommand or TMPSceneCommand.
[Serializable]
public struct TMPSceneCommandWrapper : ITMPCommand, ITMPParameterValidator
- Implements
- Inherited Members
Properties
Custom
The wrapped custom command.
The ITMPCommand implementation of the wrapper delegates to this
if Type is set to Generic.
public TMPSceneCommand Custom { get; set; }
Property Value
ExecuteInstantly
Whether the command is executed the moment the TMPWriter begins writing.
Otherwise, it is executed when the TMPWriter shows the character at the corresponding index.
public bool ExecuteInstantly { get; }
Property Value
ExecuteOnSkip
Whether the command should be executed by the TMPWriter if its text position is skipped over.
public bool ExecuteOnSkip { get; }
Property Value
ExecuteRepeatable
Whether the command may be executed multiple times if, for example, the TMPWriter is reset to an earlier text position after the command has been executed.
An example for a command that should not be repeatable is one that triggers a quest, or adds an item to the player's inventory.
public bool ExecuteRepeatable { get; }
Property Value
Generic
The wrapped generic command.
The ITMPCommand implementation of the wrapper delegates to this
if Type is set to Custom.
public TMPGenericSceneCommand Generic { get; set; }
Property Value
TagType
The type of command this is.
public TagType TagType { get; }
Property Value
Remarks
Index: This type of command is executed when the TMPWriter shows the character at the corresponding index. It does not need to be closed.
Example: This is <!delay=0.01> my text
Block: This type of command is executed when the TMPWriter shows the character at the first corresponding index. It needs to be closed, and will operate on the enclosed text.
Example: This <!show>is my</!show> text
Either: Both applications are valid.
Type
The type of this wrapper.
The ITMPCommand implementation delegates to Generic or Custom
depending on the value of this.
public TMPSceneCommandWrapper.TMPSceneCommandType Type { get; set; }
Property Value
Methods
ExecuteCommand(ICommandContext)
Execute the command.
public void ExecuteCommand(ICommandContext context)
Parameters
context
ICommandContext
GetNewCustomData()
Get a new custom data object for this command.
public object GetNewCustomData()
Returns
- object
The custom data object for this command.
SetParameters(object, IDictionary<string, string>, ITMPKeywordDatabase)
Set the parameters for the command.
public void SetParameters(object customData, IDictionary<string, string> parameters, ITMPKeywordDatabase keywordDatabase)
Parameters
customData
objectThe custom data for this command.
parameters
IDictionary<string, string>Parameters as key-value-pairs.
keywordDatabase
ITMPKeywordDatabaseThe keyword database used for parsing the parameter values.
ValidateParameters(IDictionary<string, string>, ITMPKeywordDatabase)
Validate the given parameters.
public bool ValidateParameters(IDictionary<string, string> parameters, ITMPKeywordDatabase keywordDatabase)
Parameters
parameters
IDictionary<string, string>The parameters as key-value pairs
keywordDatabase
ITMPKeywordDatabaseThe keyword database used for parsing the parameter values
Returns
- bool
true if the parameters were successfully validated; false otherwise.