Table of Contents

Method AddNode

Namespace
Gamelogic.Grids2.Graph.Editor
Assembly
Gamelogic.Grids2.Editor.dll

AddNode<TNode>(Graph<TNode>, Type, Vector2, string)

Creates and adds a new unlinked node to the graph.

public static TNode AddNode<TNode>(this Graph<TNode> graph, Type nodeType, Vector2 initialPosition, string name) where TNode : BaseNode

Parameters

graph Graph<TNode>

Graph where the node will be added

nodeType Type

Node to add.

initialPosition Vector2

The initial position the node will be displayed in the visual representation.

name string

Name of the node

Returns

TNode

The newly created node.

Type Parameters

TNode

The type of the node to add.