update
This commit is contained in:
16
ui_events/Sources/lnx/MyTrait.hx
Normal file
16
ui_events/Sources/lnx/MyTrait.hx
Normal file
@ -0,0 +1,16 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user