Files
LNXSDK/leenkx/Sources/leenkx/logicnode/GetChildrenNode.hx

19 lines
347 B
Haxe

package leenkx.logicnode;
import iron.object.Object;
class GetChildrenNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function get(from: Int): Dynamic {
var object: Object = inputs[0].get();
if (object == null) return null;
return from == 0 ? object.children : object.children.length;
}
}