|
EasyTalk API
|
A node for triggering script methods. More...
Inherits EasyTalk.Nodes.Core.Node, EasyTalk.Nodes.Core.DialogueFlowNode, and EasyTalk.Nodes.Core.FunctionalNode.
Public Member Functions | |||||||
| 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.
| |||||||
| NodeConnection | GetFlowOutput () | ||||||
Returns the dialogue flow output for the node.
| |||||||
| bool | 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.
| |||||||
| bool | HasDependencies () | ||||||
Returns whether the node is dependent on values coming into input connections.
| |||||||
| 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.
| |||||||
Public Member Functions inherited from EasyTalk.Nodes.Core.Node | |||||||
| 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 Public Member Functions | |
| 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 Public Member Functions inherited from EasyTalk.Nodes.Core.Node | |
| static Node | Deserialize (string json) |
| Deserializes a Node from the specified JSON string. | |
Properties | |
| 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. | |
Properties inherited from EasyTalk.Nodes.Core.Node | |
| 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. | |
Private Member Functions | |
| 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. | |
Private Attributes | |
| string | triggeredClassName |
| The name of the class to trigger a method on. | |
| string | triggeredMethodName |
| The name of the method to trigger. | |
| string | methodSignature |
| A string representation of the method signature for the triggered method. | |
| string[] | parameterTypes |
| The type names for each parameter required for the triggered method. | |
| string[] | parameterValues |
| The values to pass into the triggered method. | |
| TriggerFilterType | triggerType = TriggerFilterType.SELF |
| The mode or type of method to trigger. | |
| string | objectTagOrName |
| The name of the GameObject or the tag of the GameObject to trigger the method on. | |
Additional Inherited Members | |
Protected Member Functions inherited from EasyTalk.Nodes.Core.Node | |
| List< NodeConnection > | FindFlowInputs () |
| Finds and returns a List of all inputs which are dialogue flow inputs. | |
| List< NodeConnection > | FindFlowOutputs () |
| Finds and returns a List of all outputs which are dialogue flow outputs. | |
Protected Attributes inherited from EasyTalk.Nodes.Core.Node | |
| int | nodeId = NodeUtils.NextID() |
| The ID of the node. | |
| string | name |
| The name of the node. | |
| NodeType | nodeType |
| The type of the node. | |
| List< NodeConnection > | inputs = new List<NodeConnection>() |
| A List of input connections of the node. | |
| List< NodeConnection > | outputs = new List<NodeConnection>() |
| A List of output connections of the node. | |
A node for triggering script methods.
| EasyTalk.Nodes.Logic.TriggerScriptNode.TriggerScriptNode | ( | ) |
Creates a new TriggerScriptNode.
|
static |
Attempts to convert the object value provided to the specified Type.
| obj | The object to convert. |
| type | The Type to convert the provided object to. |
| bool 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.
| 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.
|
private |
Determines the values for each parameter to pass to the method to be called.
| 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. |
| 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.
Implements EasyTalk.Nodes.Core.FunctionalNode.
| NodeConnection EasyTalk.Nodes.Logic.TriggerScriptNode.GetFlowInput | ( | ) |
Returns the dialogue flow input for the node.
Implements EasyTalk.Nodes.Core.DialogueFlowNode.
| NodeConnection EasyTalk.Nodes.Logic.TriggerScriptNode.GetFlowOutput | ( | ) |
Returns the dialogue flow output for the node.
Implements EasyTalk.Nodes.Core.DialogueFlowNode.
|
private |
Returns an array of Types to use for the parameters of the method to be called.
|
static |
Returns the actual Type for the simplified type string provided.
| simpleTypeName | A simplified type name. |
| bool EasyTalk.Nodes.Logic.TriggerScriptNode.HasDependencies | ( | ) |
Returns whether the node is dependent on values coming into input connections.
Implements EasyTalk.Nodes.Core.FunctionalNode.
| object EasyTalk.Nodes.Logic.TriggerScriptNode.TriggerScript | ( | NodeHandler | nodeHandler, |
| Dictionary< int, object > | nodeOutputValues, | ||
| GameObject | convoOwner = null ) |
Triggers the script as defined by the node.
| 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. |
|
private |
A string representation of the method signature for the triggered method.
|
private |
The name of the GameObject or the tag of the GameObject to trigger the method on.
|
private |
The type names for each parameter required for the triggered method.
|
private |
The values to pass into the triggered method.
|
private |
The name of the class to trigger a method on.
|
private |
The name of the method to trigger.
|
private |
The mode or type of method to trigger.
|
getset |
Gets or sets the string representation of the method signature for the method to be triggered.
|
getset |
Gets or sets the name or tag of the GameObject to use when triggering the method.
|
getset |
Gets or sets the type names for the parameters passed into the method to be triggered.
|
getset |
Gets or sets the parameter values to pass into the method to be triggered.
|
getset |
Gets or sets the class name to trigger a method on.
|
getset |
Gets or sets the name of the method to trigger.
|
getset |
Gets or sets the mode or type of method to trigger.
|
getset |
Gets or sets the mode or type of method to trigger (from a string equivalent to a TriggerFilterType toString() value).