1
0
forked from Onek8/LNXSDK
Files
LNXSDK/leenkx/Sources/leenkx/logicnode/PlayTilesheetActionNode.hx

24 lines
439 B
Haxe

package leenkx.logicnode;
import iron.object.MeshObject;
class PlayTilesheetActionNode 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 || object.tilesheet == null) return;
object.tilesheet.play(action, function() {
runOutput(1);
});
runOutput(0);
}
}