Files
armorpaint/Sources/arm/logicnode/IntegerNode.hx
T
Lubos Lenco bda8b2d54f Init
2017-12-14 11:12:51 +01:00

25 lines
480 B
Haxe

package arm.logicnode;
import armory.logicnode.LogicNode;
import armory.logicnode.LogicTree;
class IntegerNode extends LogicNode {
public var value:Int;
public function new(tree:LogicTree, value = 0) {
super(tree);
this.value = value;
}
override function get(from:Int):Dynamic {
if (inputs.length > 0) return inputs[0].get();
return value;
}
override function set(value:Dynamic) {
if (inputs.length > 0) inputs[0].set(value);
else this.value = value;
}
}