![]() |
EasyTalk API
|
A node which performs a boolean logic operation, outputs the boolean result, and continues down the dialogue flow path attributed to that result. More...
Inherits EasyTalk.Nodes.Core.Node, EasyTalk.Nodes.Core.DialogueFlowNode, EasyTalk.Nodes.Core.ConditionalNode, and EasyTalk.Nodes.Core.FunctionalNode.
Public Types | |
enum | LogicOperation { AND , OR , XOR , NOT , IS_TRUE , IS_FALSE } |
An enumeration defining the types of boolean logic operations which can be performed by a logic node. More... | |
Public Member Functions | |||||||
LogicNode () | |||||||
Creates a new LogicNode. | |||||||
LogicOperation | GetLogicMode () | ||||||
Returns the logic operation used by the node. | |||||||
void | SetLogicMode (LogicOperation operation) | ||||||
Sets the logic operation used by 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.
| |||||||
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.
| |||||||
NodeConnection | GetFalseOutput () | ||||||
Returns the dialogue flow output connection for when the result of the node's condition is false.
| |||||||
NodeConnection | GetFlowInput () | ||||||
Returns the dialogue flow input for the node.
| |||||||
NodeConnection | GetFlowOutput () | ||||||
Returns the dialogue flow output for the node.
| |||||||
NodeConnection | GetOutput (bool value) | ||||||
Returns the dialogue flow output which corresponds to the specified boolean value.
| |||||||
NodeConnection | GetTrueOutput () | ||||||
Returns the dialogue flow output connection for when the result of the node's condition is true.
| |||||||
bool | HasDependencies () | ||||||
Returns whether the node is dependent on values coming into input connections.
| |||||||
![]() | |||||||
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. | |||||||
Properties | |
LogicOperation | LogicMode [get, set] |
Gets or sets the logic operation to use. | |
string | LogicOperationString [get, set] |
Gets or sets the logic operation to use (from a string equivalent to a LogicOperation toString() value). | |
![]() | |
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 Attributes | |
LogicOperation | logicOperation = LogicOperation.AND |
The logic operation to use. | |
Additional Inherited Members | |
![]() | |
static Node | Deserialize (string json) |
Deserializes a Node from the specified JSON string. | |
![]() | |
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. | |
![]() | |
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 which performs a boolean logic operation, outputs the boolean result, and continues down the dialogue flow path attributed to that result.
EasyTalk.Nodes.Logic.LogicNode.LogicNode | ( | ) |
Creates a new LogicNode.
void EasyTalk.Nodes.Logic.LogicNode.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.
List< int > EasyTalk.Nodes.Logic.LogicNode.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.LogicNode.GetFalseOutput | ( | ) |
Returns the dialogue flow output connection for when the result of the node's condition is false.
Implements EasyTalk.Nodes.Core.ConditionalNode.
NodeConnection EasyTalk.Nodes.Logic.LogicNode.GetFlowInput | ( | ) |
Returns the dialogue flow input for the node.
Implements EasyTalk.Nodes.Core.DialogueFlowNode.
NodeConnection EasyTalk.Nodes.Logic.LogicNode.GetFlowOutput | ( | ) |
Returns the dialogue flow output for the node.
Implements EasyTalk.Nodes.Core.DialogueFlowNode.
LogicOperation EasyTalk.Nodes.Logic.LogicNode.GetLogicMode | ( | ) |
Returns the logic operation used by the node.
NodeConnection EasyTalk.Nodes.Logic.LogicNode.GetOutput | ( | bool | value | ) |
Returns the dialogue flow output which corresponds to the specified boolean value.
value | The value to retrieve a dialogue flow output for. |
Implements EasyTalk.Nodes.Core.ConditionalNode.
NodeConnection EasyTalk.Nodes.Logic.LogicNode.GetTrueOutput | ( | ) |
Returns the dialogue flow output connection for when the result of the node's condition is true.
Implements EasyTalk.Nodes.Core.ConditionalNode.
bool EasyTalk.Nodes.Logic.LogicNode.HasDependencies | ( | ) |
Returns whether the node is dependent on values coming into input connections.
Implements EasyTalk.Nodes.Core.FunctionalNode.
void EasyTalk.Nodes.Logic.LogicNode.SetLogicMode | ( | LogicOperation | operation | ) |
Sets the logic operation used by the node.
operation | The logic operation to use. |
|
private |
The logic operation to use.
|
getset |
Gets or sets the logic operation to use.
|
getset |
Gets or sets the logic operation to use (from a string equivalent to a LogicOperation toString() value).