armory/Sources/armory/logicnode/SetVariableNode.hx

18 lines
279 B
Haxe
Raw Normal View History

2017-04-03 22:29:46 +02:00
package armory.logicnode;
2017-04-08 20:05:35 +02:00
class SetVariableNode 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) {
2017-04-03 22:29:46 +02:00
var variable = inputs[1];
2019-12-19 23:54:08 +01:00
var value: Dynamic = inputs[2].get();
2017-04-03 22:29:46 +02:00
variable.set(value);
2018-10-22 10:10:33 +02:00
runOutput(0);
2017-04-03 22:29:46 +02:00
}
}