Description

Represents the Switch Node in ReturnGraph, and is converted to a SwitchRuntimeNode<T> for runtime use. The SwitchNode draws its input and output ports using an RgEnumType<T> option.

Methods

Method Description
OnDefineOptions Adds an option to the node for an RgEnumType<T>.
OnDefinePorts Defines the input and output ports for the node in the specified context. An RgEnumType<T> is used to define and configure input and output ports for the node. An input variable port is defined using the type of the provided enum. An output port is drawn for each value in the provided enum.
BuildRuntimeNode Returns a SwitchRuntimeNode<T> containing the type of the RgEnumType<T> provided.
GetInputPortVariableName Retrieves the name of the variable connected to the variable input port of the node.
GetNodeEnum Retrieves the RgEnumType<T> associated with the current node.

A SwitchNode with an RgEnumType<T> called “TurnPhase,” which has two options, “PlayerTurn” and “EnemyTurn”. The node requires an input variable of type TurnPhase.

A SwitchNode with an RgEnumType<T> called “TurnPhase,” which has two options, “PlayerTurn” and “EnemyTurn”. The node requires an input variable of type TurnPhase.