Files
2026-05-06 17:52:45 -07:00

17 lines
302 B
Haxe

package lnx;
class MyTrait extends iron.Trait {
public function new() {
super();
leenkx.system.Event.add("move_box", onEvent);
}
function onEvent() {
trace("move_box");
var loc = object.transform.loc;
loc.y += 1;
if (loc.y > 4) loc.y -= 8;
object.transform.buildMatrix();
}
}