armory/Sources/armory/logicnode/ResumeTraitNode.hx

18 lines
327 B
Haxe
Raw Normal View History

2018-08-16 19:18:44 +02:00
package armory.logicnode;
class ResumeTraitNode extends LogicNode {
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2018-08-16 19:18:44 +02:00
super(tree);
}
2019-12-19 23:54:08 +01:00
override function run(from: Int) {
var trait: Dynamic = inputs[1].get();
if (trait == null || !Std.isOfType(trait, LogicTree)) return;
2018-08-16 19:18:44 +02:00
cast(trait, LogicTree).resume();
2018-10-22 10:10:33 +02:00
runOutput(0);
2018-08-16 19:18:44 +02:00
}
}