armory/Sources/armory/logicnode/AnimActionNode.hx

22 lines
424 B
Haxe
Raw Normal View History

2017-09-08 13:57:34 +02:00
package armory.logicnode;
class AnimActionNode extends LogicNode {
2019-12-19 23:54:08 +01:00
public var value: String;
2017-09-08 13:57:34 +02:00
2019-12-19 23:54:08 +01:00
public function new(tree: LogicTree, value = "") {
2017-09-08 13:57:34 +02:00
super(tree);
this.value = value;
}
2019-12-19 23:54:08 +01:00
override function get(from: Int): Dynamic {
2017-09-08 13:57:34 +02:00
if (inputs.length > 0) return inputs[0].get();
return value;
}
2019-12-19 23:54:08 +01:00
override function set(value: Dynamic) {
2017-09-08 13:57:34 +02:00
if (inputs.length > 0) inputs[0].set(value);
else this.value = value;
}
}