2017-04-08 00:34:45 +02:00
|
|
|
package armory.logicnode;
|
|
|
|
|
2017-04-08 20:05:35 +02:00
|
|
|
class CallGroupNode extends LogicNode {
|
2017-04-08 00:34:45 +02:00
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
public var property0: String;
|
|
|
|
var callTree: LogicTree = null;
|
2017-04-08 00:34:45 +02:00
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
public function new(tree: LogicTree) {
|
2017-04-08 00:34:45 +02:00
|
|
|
super(tree);
|
|
|
|
}
|
|
|
|
|
2017-11-09 19:47:10 +01:00
|
|
|
@:access(iron.Trait)
|
2019-12-19 23:54:08 +01:00
|
|
|
override function run(from: Int) {
|
2017-04-08 00:34:45 +02:00
|
|
|
|
2018-01-29 13:52:39 +01:00
|
|
|
if (callTree == null) {
|
2017-11-09 19:47:10 +01:00
|
|
|
var classType = Type.resolveClass(property0);
|
2018-01-29 13:52:39 +01:00
|
|
|
callTree = Type.createInstance(classType, []);
|
|
|
|
callTree.object = tree.object;
|
|
|
|
callTree.add();
|
2017-11-09 19:47:10 +01:00
|
|
|
}
|
2017-04-08 00:34:45 +02:00
|
|
|
|
2018-01-29 13:52:39 +01:00
|
|
|
if (callTree._init != null) callTree._init[0]();
|
2017-04-08 00:34:45 +02:00
|
|
|
|
2018-10-22 10:10:33 +02:00
|
|
|
runOutput(0);
|
2017-04-08 00:34:45 +02:00
|
|
|
}
|
|
|
|
}
|