2017-04-11 11:28:22 +02:00
|
|
|
package armory.logicnode;
|
|
|
|
|
|
|
|
class AlternateNode extends LogicNode {
|
|
|
|
|
|
|
|
var b = true;
|
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
public function new(tree: LogicTree) {
|
2017-04-11 11:28:22 +02:00
|
|
|
super(tree);
|
|
|
|
}
|
|
|
|
|
2019-12-19 23:54:08 +01:00
|
|
|
override function run(from: Int) {
|
2018-10-22 10:10:33 +02:00
|
|
|
b ? runOutput(0) : runOutput(1);
|
2017-04-11 11:28:22 +02:00
|
|
|
b = !b;
|
|
|
|
}
|
|
|
|
}
|