armory/Sources/armory/logicnode/PlayTilesheetNode.hx
2019-12-19 23:54:08 +01:00

24 lines
405 B
Haxe

package armory.logicnode;
import iron.object.MeshObject;
class PlayTilesheetNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var object: MeshObject = inputs[1].get();
var action: String = inputs[2].get();
if (object == null) return;
object.tilesheet.play(action, function() {
runOutput(1);
});
runOutput(0);
}
}