Skip to main content

Command

Command is where the actual functionality exists, and it's represented as a Node.

Code-wise, all Command types are derivations of Command. It is a class that mainly consists of a single executable method called Execute.

Commands also have in-points and out-points that connect Nodes. In-points receive connections from out-points.

Command

Notice that each command node may have different connection point colors. Each color represents a different connection type. Each connection will pass certain data, except for the white connection. The white connection is called the Main Connection, while the other colors are Property Connections.

In-points and out-points can only be connected if they are of the same color. To create a connection, we can left click or hold click an out-point of a certain command, and then left click an in-point of another command. To remove a connection, we can left click the dot in the middle of the connection line.

There are 2 types of Command:

  • Main Command
  • Property Command

1. Main Command

This type of command is inherited directly from Command class. A Main Command is a command that has at least a main connection (the white one). It's called Main since it's the command that directly follows the main flow.

Main Command's in-point can be connected from multiple out-points. But the out-point can't be connected to multiple in-points.

2. Property Command

This type of command is inherited from the PropertyCommand class. A Property Command is a command that passes through a property connection, and has no main connection. It is not directly a part of the main flow. It is supposed to return a value as an input of another Main Command. A Property Command is indirectly called when another Main Command executes and accesses its in-point.

As opposed to Main Command: Property Command's in-point can't be connected from multiple out-points, since it will be ambiguous in which data to receive. But the out-point can be connected to multiple in-points since it only returns a data and does not mess with the flow.

On the example image above, Float Comparator command is called only because Branch Command is being called.