Files
LNXSDK/leenkx/Sources/leenkx/logicnode/SelectOutputNode.hx
2025-01-22 16:18:30 +01:00

21 lines
381 B
Haxe

package leenkx.logicnode;
class SelectOutputNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
//Get index to run
var outIndex: Int = inputs[1].get();
// Check if output index found
if(outIndex > (outputs.length - 2) || outIndex < 0)
{
runOutput(0);
return;
}
runOutput(outIndex + 1);
}
}