armory/Sources/armory/logicnode/ToBoolNode.hx

22 lines
303 B
Haxe
Raw Normal View History

2018-02-20 18:46:16 +01:00
package armory.logicnode;
class ToBoolNode extends LogicNode {
2019-12-19 23:54:08 +01:00
var value: Bool;
2018-02-20 18:46:16 +01:00
var b = false;
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree) {
2018-02-20 18:46:16 +01:00
super(tree);
}
2019-12-19 23:54:08 +01:00
override function run(from: Int) {
2018-02-20 18:46:16 +01:00
b = true;
}
2019-12-19 23:54:08 +01:00
override function get(from: Int): Dynamic {
2018-02-20 18:46:16 +01:00
value = b;
b = false;
return value;
}
}