![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Base class for all nodes More...
Classes | |
class | CreateNodeMenuAttribute |
class | InputAttribute |
Mark a serializable field as an input port. You can access this through GetInputPort(string) More... | |
class | NodeTintAttribute |
class | NodeWidthAttribute |
class | OutputAttribute |
Mark a serializable field as an output port. You can access this through GetOutputPort(string) More... | |
Public Types | |
enum class | ShowBackingValue { Never , Unconnected , Always } |
Used by InputAttribute and OutputAttribute to determine when to display the field value associated with a NodePort More... | |
enum class | ConnectionType { Multiple , Override } |
enum class | TypeConstraint { None , Inherited , Strict , InheritedInverse } |
Tells which types of input to allow More... | |
Public Member Functions | |
NodePort | AddInstanceInput (Type type, Node.ConnectionType connectionType=Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint=TypeConstraint.None, string fieldName=null) |
NodePort | AddInstanceOutput (Type type, Node.ConnectionType connectionType=Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint=TypeConstraint.None, string fieldName=null) |
void | RemoveInstancePort (string fieldName) |
void | RemoveInstancePort (NodePort port) |
void | ClearInstancePorts () |
void | UpdateStaticPorts () |
Update static ports to reflect class fields. This happens automatically on enable. More... | |
void | VerifyConnections () |
Checks all connections for invalid references, and removes them. More... | |
NodePort | AddDynamicInput (Type type, Node.ConnectionType connectionType=Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint=TypeConstraint.None, string fieldName=null) |
Convenience function. More... | |
NodePort | AddDynamicOutput (Type type, Node.ConnectionType connectionType=Node.ConnectionType.Multiple, Node.TypeConstraint typeConstraint=TypeConstraint.None, string fieldName=null) |
Convenience function. More... | |
void | RemoveDynamicPort (string fieldName) |
Remove an dynamic port from the node More... | |
void | RemoveDynamicPort (NodePort port) |
Remove an dynamic port from the node More... | |
void | ClearDynamicPorts () |
Removes all dynamic ports from the node More... | |
NodePort | GetOutputPort (string fieldName) |
Returns output port which matches fieldName More... | |
NodePort | GetInputPort (string fieldName) |
Returns input port which matches fieldName More... | |
NodePort | GetPort (string fieldName) |
Returns port which matches fieldName More... | |
bool | HasPort (string fieldName) |
T | GetInputValue< T > (string fieldName, T fallback=default(T)) |
Return input value for a specified port. Returns fallback value if no ports are connected More... | |
T[] | GetInputValues< T > (string fieldName, params T[] fallback) |
Return all input values for a specified port. Returns fallback value if no ports are connected More... | |
virtual object | GetValue (NodePort port) |
Returns a value based on requested port output. Should be overridden in all derived nodes with outputs. More... | |
virtual void | OnCreateConnection (NodePort from, NodePort to) |
Called after a connection between two NodePorts is created More... | |
virtual void | OnRemoveConnection (NodePort port) |
Called after a connection is removed from this port More... | |
void | ClearConnections () |
Disconnect everything from this node More... | |
Public Attributes | |
NodeGraph | graph |
Parent NodeGraph More... | |
Vector2 | position |
Position on the NodeGraph More... | |
Static Public Attributes | |
static NodeGraph | graphHotfix |
Used during node instantiation to fix null/misconfigured graph during OnEnable/Init. Set it before instantiating a node. Will automatically be unset during OnEnable More... | |
Protected Member Functions | |
void | OnEnable () |
virtual void | Init () |
Initialize node. Called on enable. More... | |
Properties | |
IEnumerable< NodePort > | InstancePorts [get] |
IEnumerable< NodePort > | InstanceOutputs [get] |
IEnumerable< NodePort > | InstanceInputs [get] |
IEnumerable< NodePort > | Ports [get] |
Iterate over all ports on this node. More... | |
IEnumerable< NodePort > | Outputs [get] |
Iterate over all outputs on this node. More... | |
IEnumerable< NodePort > | Inputs [get] |
Iterate over all inputs on this node. More... | |
IEnumerable< NodePort > | DynamicPorts [get] |
Iterate over all dynamic ports on this node. More... | |
IEnumerable< NodePort > | DynamicOutputs [get] |
Iterate over all dynamic outputs on this node. More... | |
IEnumerable< NodePort > | DynamicInputs [get] |
Iterate over all dynamic inputs on this node. More... | |
Base class for all nodes
Classes extending this class will be considered as valid nodes by xNode.
|
strong |
|
strong |
Used by InputAttribute and OutputAttribute to determine when to display the field value associated with a NodePort
Enumerator | |
---|---|
Never | Never show the backing value |
Unconnected | Show the backing value only when the port does not have any active connections |
Always | Always show the backing value |
|
strong |
Tells which types of input to allow
NodePort XNode.Node.AddDynamicInput | ( | Type | type, |
Node.ConnectionType | connectionType = Node.ConnectionType.Multiple , |
||
Node.TypeConstraint | typeConstraint = TypeConstraint.None , |
||
string | fieldName = null |
||
) |
Convenience function.
NodePort XNode.Node.AddDynamicOutput | ( | Type | type, |
Node.ConnectionType | connectionType = Node.ConnectionType.Multiple , |
||
Node.TypeConstraint | typeConstraint = TypeConstraint.None , |
||
string | fieldName = null |
||
) |
Convenience function.
NodePort XNode.Node.AddInstanceInput | ( | Type | type, |
Node.ConnectionType | connectionType = Node.ConnectionType.Multiple , |
||
Node.TypeConstraint | typeConstraint = TypeConstraint.None , |
||
string | fieldName = null |
||
) |
NodePort XNode.Node.AddInstanceOutput | ( | Type | type, |
Node.ConnectionType | connectionType = Node.ConnectionType.Multiple , |
||
Node.TypeConstraint | typeConstraint = TypeConstraint.None , |
||
string | fieldName = null |
||
) |
void XNode.Node.ClearConnections | ( | ) |
Disconnect everything from this node
void XNode.Node.ClearDynamicPorts | ( | ) |
Removes all dynamic ports from the node
void XNode.Node.ClearInstancePorts | ( | ) |
NodePort XNode.Node.GetInputPort | ( | string | fieldName | ) |
Returns input port which matches fieldName
T XNode.Node.GetInputValue< T > | ( | string | fieldName, |
T | fallback = default(T) |
||
) |
Return input value for a specified port. Returns fallback value if no ports are connected
fieldName | Field name of requested input port |
fallback | If no ports are connected, this value will be returned |
T [] XNode.Node.GetInputValues< T > | ( | string | fieldName, |
params T[] | fallback | ||
) |
Return all input values for a specified port. Returns fallback value if no ports are connected
fieldName | Field name of requested input port |
fallback | If no ports are connected, this value will be returned |
NodePort XNode.Node.GetOutputPort | ( | string | fieldName | ) |
Returns output port which matches fieldName
NodePort XNode.Node.GetPort | ( | string | fieldName | ) |
Returns port which matches fieldName
|
virtual |
Returns a value based on requested port output. Should be overridden in all derived nodes with outputs.
port | The requested port. |
Reimplemented in PlatformerPro.AI.Interrupts.EnemyInterruptTimer, PlatformerPro.AI.Interrupts.EnemyInterruptHealth, PlatformerPro.AI.Interrupts.EnemyInterruptEnemyMessage, PlatformerPro.AI.Interrupts.EnemyInterruptDamagedNode, PlatformerPro.AI.Interrupts.EnemyInterruptCounter, PlatformerPro.AI.Interrupts.EnemyInterruptAttackedNode, PlatformerPro.AI.EnemyStepNode, PlatformerPro.AI.EnemyOptionNode, PlatformerPro.AI.EnemyNode_RandomOption, PlatformerPro.AI.EnemyNode, PlatformerPro.AI.EnemyEntryNode, PlatformerPro.AI.Actions.EnemyAction, PlatformerPro.Dialog.DialogStepNode, PlatformerPro.Dialog.DialogOptionNode, PlatformerPro.Dialog.DialogNode, PlatformerPro.Dialog.DialogEventNode, and PlatformerPro.Dialog.DialogEntryNode.
bool XNode.Node.HasPort | ( | string | fieldName | ) |
|
protectedvirtual |
Initialize node. Called on enable.
Reimplemented in PlatformerPro.AI.EnemyNode, PlatformerPro.AI.Actions.EnemyAction, PlatformerPro.Dialog.DialogNode, and PlatformerPro.Dialog.DialogEventNode.
Called after a connection between two NodePorts is created
from | Output |
to | Input |
|
protected |
|
virtual |
Called after a connection is removed from this port
port | Output or Input |
void XNode.Node.RemoveDynamicPort | ( | NodePort | port | ) |
Remove an dynamic port from the node
void XNode.Node.RemoveDynamicPort | ( | string | fieldName | ) |
Remove an dynamic port from the node
void XNode.Node.RemoveInstancePort | ( | NodePort | port | ) |
void XNode.Node.RemoveInstancePort | ( | string | fieldName | ) |
void XNode.Node.UpdateStaticPorts | ( | ) |
Update static ports to reflect class fields. This happens automatically on enable.
void XNode.Node.VerifyConnections | ( | ) |
Checks all connections for invalid references, and removes them.
|
static |
Used during node instantiation to fix null/misconfigured graph during OnEnable/Init. Set it before instantiating a node. Will automatically be unset during OnEnable
Vector2 XNode.Node.position |
Position on the NodeGraph
|
get |
Iterate over all dynamic inputs on this node.
|
get |
Iterate over all dynamic outputs on this node.
|
get |
Iterate over all dynamic ports on this node.
|
get |
Iterate over all inputs on this node.
|
get |
|
get |
|
get |
|
get |
Iterate over all outputs on this node.
|
get |
Iterate over all ports on this node.