A node for triggering script methods.
More...
Inherits EasyTalk.Nodes.Core.Node, EasyTalk.Nodes.Core.DialogueFlowNode, and EasyTalk.Nodes.Core.FunctionalNode.
|
| TriggerScriptNode () |
| Creates a new TriggerScriptNode.
|
|
object | TriggerScript (NodeHandler nodeHandler, Dictionary< int, object > nodeOutputValues, GameObject convoOwner=null) |
| Triggers the script as defined by the node.
|
|
NodeConnection | GetFlowInput () |
| Returns the dialogue flow input for the node.- Returns
- The dialogue flow input for the node.
|
|
NodeConnection | GetFlowOutput () |
| Returns the dialogue flow output for the node.- Returns
- The dialogue flow output for the node.
|
|
void | DetermineAndStoreValue (NodeHandler nodeHandler, Dictionary< int, object > nodeValues, GameObject convoOwner=null) |
| Determines the value of this node and stores it in the provided Dictionary of node and connection IDs to values.- Parameters
-
nodeHandler | The node handler being used. |
nodeValues | A mapping between node or connection IDs and the values attributed to them. |
convoOwner | The GameObject which on which the dialogue logic is currently running. |
|
|
bool | HasDependencies () |
| Returns whether the node is dependent on values coming into input connections.- Returns
- Whether the node has dependencies.
|
|
List< int > | GetDependencyOutputIDs () |
| Returns a List of IDs for output connections that this node is dependent on in order to evaluate itself and determine the value to store.- Returns
- The List of output connections that this node is dependent on.
|
|
void | AddInput (NodeConnection input) |
| Adds the provided input connection to the node's inputs.
|
|
void | AddOutput (NodeConnection output) |
| Adds the provided output connection to the node's outputs.
|
|
NodeConnection | AddInput (InputOutputType connectionType) |
| Adds a new input connection of the specified type to the node's inputs.
|
|
NodeConnection | AddOutput (InputOutputType connectionType) |
| Adds a new output connection of the specified type to the node's outputs.
|
|
NodeConnection | FindOutputOfType (InputOutputType outputType) |
| Finds the first output which matches the specified output type.
|
|
NodeConnection | FindInputOfType (InputOutputType inputType) |
| Finds the first input which matches the specified input type.
|
|
bool | HasConnectedInputs () |
| Returns true if this node has inputs which are connected to other node outputs.
|
|
bool | HasConnectedOutputs () |
| Returns true if this node has outputs which are connected to other node inputs.
|
|
List< int > | FindDependencyOutputIDs () |
| Finds and returns a List of all output IDs which are connected to this node's value (non-dialogue-flow) inputs.
|
|
string | GetJSON () |
| Returns a JSON string representation of the node.
|
|
|
static Type | GetTypeForString (string simpleTypeName) |
| Returns the actual Type for the simplified type string provided.
|
|
static object | ConvertToType (object obj, Type type) |
| Attempts to convert the object value provided to the specified Type.
|
|
static Node | Deserialize (string json) |
| Deserializes a Node from the specified JSON string.
|
|
|
string | TriggeredClassName [get, set] |
| Gets or sets the class name to trigger a method on.
|
|
string | TriggeredMethodName [get, set] |
| Gets or sets the name of the method to trigger.
|
|
string | MethodSignature [get, set] |
| Gets or sets the string representation of the method signature for the method to be triggered.
|
|
string[] | ParameterTypes [get, set] |
| Gets or sets the type names for the parameters passed into the method to be triggered.
|
|
string[] | ParameterValues [get, set] |
| Gets or sets the parameter values to pass into the method to be triggered.
|
|
string | TriggerTypeString [get, set] |
| Gets or sets the mode or type of method to trigger (from a string equivalent to a TriggerFilterType toString() value).
|
|
TriggerFilterType | TriggerType [get, set] |
| Gets or sets the mode or type of method to trigger.
|
|
string | ObjectTagOrName [get, set] |
| Gets or sets the name or tag of the GameObject to use when triggering the method.
|
|
int | ID [get, set] |
| Gets or sets the node ID.
|
|
string | NodeTypeString [get, set] |
| Gets or sets the node type string.
|
|
float | XPosition [get, set] |
| Gets or sets the X position of the node.
|
|
float | YPosition [get, set] |
| Gets or sets the Y position of the node.
|
|
string | Name [get, set] |
| Gets or sets the name of the node.
|
|
float | Width [get, set] |
| Gets or sets the width of the node.
|
|
float | Height [get, set] |
| Gets or sets the height of the node.
|
|
NodeType | NodeType [get, set] |
| Gets or sets the node type.
|
|
List< NodeConnection > | Inputs [get, set] |
| Gets or sets the List of input connections of the node.
|
|
List< NodeConnection > | Outputs [get, set] |
| Gets or sets the List of output connections of the node.
|
|
|
object[] | DetermineParameterValues (NodeHandler nodeHandler, Dictionary< int, object > nodeOutputValues, Type[] paramTypes) |
| Determines the values for each parameter to pass to the method to be called.
|
|
Type[] | GetParameterTypes () |
| Returns an array of Types to use for the parameters of the method to be called.
|
|
A node for triggering script methods.
◆ TriggerScriptNode()
EasyTalk.Nodes.Logic.TriggerScriptNode.TriggerScriptNode |
( |
| ) |
|
Creates a new TriggerScriptNode.
◆ ConvertToType()
static object EasyTalk.Nodes.Logic.TriggerScriptNode.ConvertToType |
( |
object | obj, |
|
|
Type | type ) |
|
static |
Attempts to convert the object value provided to the specified Type.
- Parameters
-
obj | The object to convert. |
type | The Type to convert the provided object to. |
- Returns
- The converted value.
◆ DetermineAndStoreValue()
void EasyTalk.Nodes.Logic.TriggerScriptNode.DetermineAndStoreValue |
( |
NodeHandler | nodeHandler, |
|
|
Dictionary< int, object > | nodeValues, |
|
|
GameObject | convoOwner = null ) |
Determines the value of this node and stores it in the provided Dictionary of node and connection IDs to values.
- Parameters
-
nodeHandler | The node handler being used. |
nodeValues | A mapping between node or connection IDs and the values attributed to them. |
convoOwner | The GameObject which on which the dialogue logic is currently running. |
Implements EasyTalk.Nodes.Core.FunctionalNode.
◆ DetermineParameterValues()
object[] EasyTalk.Nodes.Logic.TriggerScriptNode.DetermineParameterValues |
( |
NodeHandler | nodeHandler, |
|
|
Dictionary< int, object > | nodeOutputValues, |
|
|
Type[] | paramTypes ) |
|
private |
Determines the values for each parameter to pass to the method to be called.
- Parameters
-
nodeHandler | The node handler currently processing dialogue. |
nodeOutputValues | A mapping of node IDs and connection IDs to the corresponding output values attributed to those IDs. |
paramTypes | The GameObject which is currently running the dialogue. |
- Returns
- Returns an array of values to use for each parameter.
◆ GetDependencyOutputIDs()
List< int > EasyTalk.Nodes.Logic.TriggerScriptNode.GetDependencyOutputIDs |
( |
| ) |
|
Returns a List of IDs for output connections that this node is dependent on in order to evaluate itself and determine the value to store.
- Returns
- The List of output connections that this node is dependent on.
Implements EasyTalk.Nodes.Core.FunctionalNode.
◆ GetFlowInput()
NodeConnection EasyTalk.Nodes.Logic.TriggerScriptNode.GetFlowInput |
( |
| ) |
|
◆ GetFlowOutput()
NodeConnection EasyTalk.Nodes.Logic.TriggerScriptNode.GetFlowOutput |
( |
| ) |
|
◆ GetParameterTypes()
Type[] EasyTalk.Nodes.Logic.TriggerScriptNode.GetParameterTypes |
( |
| ) |
|
|
private |
Returns an array of Types to use for the parameters of the method to be called.
- Returns
- An array of the parameter Types to pass into the called method.
◆ GetTypeForString()
static Type EasyTalk.Nodes.Logic.TriggerScriptNode.GetTypeForString |
( |
string | simpleTypeName | ) |
|
|
static |
Returns the actual Type for the simplified type string provided.
- Parameters
-
simpleTypeName | A simplified type name. |
- Returns
- The Type attributed to the simple type name specified.
◆ HasDependencies()
bool EasyTalk.Nodes.Logic.TriggerScriptNode.HasDependencies |
( |
| ) |
|
◆ TriggerScript()
object EasyTalk.Nodes.Logic.TriggerScriptNode.TriggerScript |
( |
NodeHandler | nodeHandler, |
|
|
Dictionary< int, object > | nodeOutputValues, |
|
|
GameObject | convoOwner = null ) |
Triggers the script as defined by the node.
- Parameters
-
nodeHandler | The node handler currently processing dialogue. |
nodeOutputValues | A mapping of node IDs and connection IDs to the corresponding output values attributed to those IDs. |
convoOwner | The GameObject which is currently running the dialogue. |
- Returns
- Returns the result of the method.
◆ methodSignature
string EasyTalk.Nodes.Logic.TriggerScriptNode.methodSignature |
|
private |
A string representation of the method signature for the triggered method.
◆ objectTagOrName
string EasyTalk.Nodes.Logic.TriggerScriptNode.objectTagOrName |
|
private |
The name of the GameObject or the tag of the GameObject to trigger the method on.
◆ parameterTypes
string [] EasyTalk.Nodes.Logic.TriggerScriptNode.parameterTypes |
|
private |
The type names for each parameter required for the triggered method.
◆ parameterValues
string [] EasyTalk.Nodes.Logic.TriggerScriptNode.parameterValues |
|
private |
The values to pass into the triggered method.
◆ triggeredClassName
string EasyTalk.Nodes.Logic.TriggerScriptNode.triggeredClassName |
|
private |
The name of the class to trigger a method on.
◆ triggeredMethodName
string EasyTalk.Nodes.Logic.TriggerScriptNode.triggeredMethodName |
|
private |
The name of the method to trigger.
◆ triggerType
The mode or type of method to trigger.
◆ MethodSignature
string EasyTalk.Nodes.Logic.TriggerScriptNode.MethodSignature |
|
getset |
Gets or sets the string representation of the method signature for the method to be triggered.
◆ ObjectTagOrName
string EasyTalk.Nodes.Logic.TriggerScriptNode.ObjectTagOrName |
|
getset |
Gets or sets the name or tag of the GameObject to use when triggering the method.
◆ ParameterTypes
string [] EasyTalk.Nodes.Logic.TriggerScriptNode.ParameterTypes |
|
getset |
Gets or sets the type names for the parameters passed into the method to be triggered.
◆ ParameterValues
string [] EasyTalk.Nodes.Logic.TriggerScriptNode.ParameterValues |
|
getset |
Gets or sets the parameter values to pass into the method to be triggered.
◆ TriggeredClassName
string EasyTalk.Nodes.Logic.TriggerScriptNode.TriggeredClassName |
|
getset |
Gets or sets the class name to trigger a method on.
◆ TriggeredMethodName
string EasyTalk.Nodes.Logic.TriggerScriptNode.TriggeredMethodName |
|
getset |
Gets or sets the name of the method to trigger.
◆ TriggerType
Gets or sets the mode or type of method to trigger.
◆ TriggerTypeString
string EasyTalk.Nodes.Logic.TriggerScriptNode.TriggerTypeString |
|
getset |
Gets or sets the mode or type of method to trigger (from a string equivalent to a TriggerFilterType toString() value).