armory/Sources/armory/logicnode/ArraySpliceNode.hx
2019-12-19 23:54:08 +01:00

21 lines
354 B
Haxe

package armory.logicnode;
class ArraySpliceNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var ar: Array<Dynamic> = inputs[1].get();
if (ar == null) return;
var i = inputs[2].get();
var len = inputs[3].get();
ar.splice(i, len);
runOutput(0);
}
}