2017-11-08 23:02:40 +01:00
|
|
|
package armory.logicnode;
|
|
|
|
|
2017-11-20 15:16:52 +01:00
|
|
|
import iron.object.Object;
|
2017-11-08 23:02:40 +01:00
|
|
|
|
|
|
|
class ResumeActionNode extends LogicNode {
|
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
public function new(tree: LogicTree) {
|
2017-11-08 23:02:40 +01:00
|
|
|
super(tree);
|
|
|
|
}
|
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
override function run(from: Int) {
|
|
|
|
var object: Object = inputs[1].get();
|
|
|
|
|
2017-11-08 23:02:40 +01:00
|
|
|
if (object == null) return;
|
2018-03-02 14:50:58 +01:00
|
|
|
var animation = object.animation;
|
|
|
|
if (animation == null) animation = object.getParentArmature(object.name);
|
2017-11-08 23:02:40 +01:00
|
|
|
|
2018-03-02 14:50:58 +01:00
|
|
|
animation.resume();
|
2017-11-08 23:02:40 +01:00
|
|
|
|
2018-10-22 10:10:33 +02:00
|
|
|
runOutput(0);
|
2017-11-08 23:02:40 +01:00
|
|
|
}
|
|
|
|
}
|