API ReferenceFacepunch.ActionGraphs

Nodeclass

The main building block of an action graph. Represents either an action or expression. An action node has input and output signals, and will act only when receiving a signal. Expression nodes have only input and output values, and will be evaluated lazily when one of its outputs is requested.

objectNode
Namespace
Facepunch.ActionGraphs
Assembly
Facepunch.ActionGraphs
Declaration
public class Facepunch.ActionGraphs.Node

Methods5

Showing 5 methods

public virtual sealed Facepunch.ActionGraphs.Node AddNode(Facepunch.ActionGraphs.NodeDefinition definition)PUBLICVIRTUAL

ParameterTypeDescription
definitionNodeDefinition
Returns:Node

public void MarkDirty()PUBLIC

Notify the containing graph that this node needs updating.

Returns:void

public void Remove()PUBLIC

Remove this node from the containing graph. Any links into or out of the node will also be removed.

Returns:void

public void SetParameters(System.Collections.Generic.IReadOnlyDictionary`2<string,object> properties = null, System.Collections.Generic.IReadOnlyDictionary`2<string,object> inputs = null)PUBLIC

ParameterTypeDescription
properties = nullIReadOnlyDictionary<string,object>
inputs = nullIReadOnlyDictionary<string,object>
Returns:void

public void UpdateParameters()PUBLICPER-FRAME

Immediately update this node's binding based on its input types and property values.

Returns:void

Properties18

Showing 18 properties

public virtual sealed Facepunch.ActionGraphs.ActionGraph Facepunch.ActionGraphs.Node.ActionGraph { get; set; }PUBLICVIRTUALGETSET

Parent `Facepunch.ActionGraphs.Node.ActionGraph` of this node.

Returns:ActionGraph

public System.Collections.Generic.IReadOnlyCollection`1<System.Attribute> Facepunch.ActionGraphs.Node.Attributes { get; set; }PUBLICGETSET

Attributes provided by this node's current binding.

Returns:IReadOnlyCollection<Attribute>

public System.Collections.Generic.IReadOnlyCollection`1<Facepunch.ActionGraphs.Node> Facepunch.ActionGraphs.Node.Children { get; set; }PUBLICGETSET

Nodes that were created as children of this node.

Returns:IReadOnlyCollection<Node>

public Facepunch.ActionGraphs.NodeDefinition Facepunch.ActionGraphs.Node.Definition { get; set; }PUBLICGETSET

Definition describing the behaviour and property / input / output bindings of this node.

Returns:NodeDefinition

public int Facepunch.ActionGraphs.Node.Id { get; set; }PUBLICGETSET

Unique id of this node in the containing `Facepunch.ActionGraphs.Node.ActionGraph`.

Returns:int

public Facepunch.ActionGraphs.NodeInputs Facepunch.ActionGraphs.Node.Inputs { get; set; }PUBLICGETSETINGEST

Named inputs of this node, that may either link to the outputs of other nodes, or be assigned a constant value.

Returns:NodeInputs

public virtual sealed bool Facepunch.ActionGraphs.Node.IsValid { get; set; }PUBLICVIRTUALGETSET

Will become false if this node was removed from its action graph.

Returns:bool

public Facepunch.ActionGraphs.NodeKind Facepunch.ActionGraphs.Node.Kind { get; set; }PUBLICGETSET

Is this node an action or an expression?

Returns:NodeKind

public Facepunch.ActionGraphs.NodeOutputs Facepunch.ActionGraphs.Node.Outputs { get; set; }PUBLICGETSET

Named outputs of this node, that may link to the inputs of other nodes.

Returns:NodeOutputs

public Facepunch.ActionGraphs.Node Facepunch.ActionGraphs.Node.Parent { get; set; }PUBLICGETSET

Parent of a nested node.

Returns:Node

public Facepunch.ActionGraphs.NodeProperties Facepunch.ActionGraphs.Node.Properties { get; set; }PUBLICGETSET

Constant named values stored in this node.

Returns:NodeProperties

public virtual sealed string Facepunch.ActionGraphs.Node.StackTraceIdentifier { get; set; }PUBLICVIRTUALGETSET

Returns:string

public System.Text.Json.Nodes.JsonObject Facepunch.ActionGraphs.Node.UserData { get; set; }PUBLICGETSET

Arbitrary named values stored in this node, which will be included during serialization. Values must be serializable to JSON.

Returns:JsonObject

public System.Collections.Generic.IEnumerable`1<Facepunch.ActionGraphs.Node.Property> Facepunch.ActionGraphs.Node.VariableReferences { get; set; }PUBLICGETSET

All properties or links that reference a variable.

Returns:IEnumerable<Property>

On this page

Methodspublic virtual sealed Facepunch.ActionGraphs.Node AddNode(Facepunch.ActionGraphs.NodeDefinition definition)public System.Void MarkDirty()public System.Void Remove()public System.Void SetParameters(System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object> properties = null, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object> inputs = null)public System.Void UpdateParameters()Propertiespublic virtual sealed Facepunch.ActionGraphs.ActionGraph Facepunch.ActionGraphs.Node.ActionGraph { get; set; }public System.Collections.Generic.IReadOnlyCollection`1<System.Attribute> Facepunch.ActionGraphs.Node.Attributes { get; set; }public Facepunch.ActionGraphs.NodeBinding Facepunch.ActionGraphs.Node.Binding { get; set; }public System.Collections.Generic.IReadOnlyCollection`1<Facepunch.ActionGraphs.Node> Facepunch.ActionGraphs.Node.Children { get; set; }public Facepunch.ActionGraphs.NodeDefinition Facepunch.ActionGraphs.Node.Definition { get; set; }public Facepunch.ActionGraphs.DisplayInfo Facepunch.ActionGraphs.Node.DisplayInfo { get; set; }public System.Int32 Facepunch.ActionGraphs.Node.Id { get; set; }public Facepunch.ActionGraphs.NodeInputs Facepunch.ActionGraphs.Node.Inputs { get; set; }public virtual sealed System.Boolean Facepunch.ActionGraphs.Node.IsValid { get; set; }public Facepunch.ActionGraphs.NodeKind Facepunch.ActionGraphs.Node.Kind { get; set; }public System.Collections.Generic.IEnumerable`1<Facepunch.ActionGraphs.Link> Facepunch.ActionGraphs.Node.Links { get; set; }public virtual sealed Facepunch.ActionGraphs.NodeLibrary Facepunch.ActionGraphs.Node.NodeLibrary { get; set; }public Facepunch.ActionGraphs.NodeOutputs Facepunch.ActionGraphs.Node.Outputs { get; set; }public Facepunch.ActionGraphs.Node Facepunch.ActionGraphs.Node.Parent { get; set; }public Facepunch.ActionGraphs.NodeProperties Facepunch.ActionGraphs.Node.Properties { get; set; }public virtual sealed System.String Facepunch.ActionGraphs.Node.StackTraceIdentifier { get; set; }public System.Text.Json.Nodes.JsonObject Facepunch.ActionGraphs.Node.UserData { get; set; }public System.Collections.Generic.IEnumerable`1<Facepunch.ActionGraphs.Node.Property> Facepunch.ActionGraphs.Node.VariableReferences { get; set; }Metadata