armory/Sources/armory/logicnode/SleepNode.hx

18 lines
279 B
Haxe
Raw Permalink Normal View History

2017-04-03 22:29:46 +02:00
package armory.logicnode;
2017-04-08 20:05:35 +02:00
class SleepNode extends LogicNode {
2017-04-03 22:29:46 +02:00
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2017-04-04 23:11:31 +02:00
super(tree);
2017-04-03 22:29:46 +02:00
}
2019-12-19 23:54:08 +01:00
override function run(from: Int) {
var time: Float = inputs[1].get();
2017-11-20 15:16:52 +01:00
iron.system.Tween.timer(time, done);
2017-04-03 22:29:46 +02:00
}
function done() {
2018-10-22 10:10:33 +02:00
runOutput(0);
2017-04-03 22:29:46 +02:00
}
}