Files
LNXSDK/leenkx/Sources/leenkx/logicnode/PlayTilesheetNode.hx
2025-01-22 16:18:30 +01:00

24 lines
411 B
Haxe

package leenkx.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.activeTilesheet.play(action, function() {
runOutput(1);
});
runOutput(0);
}
}