forked from LeenkxTeam/Leenkx_Examples
update
This commit is contained in:
19
logic_event_fromhaxe/Sources/lnx/SendEvent.hx
Normal file
19
logic_event_fromhaxe/Sources/lnx/SendEvent.hx
Normal file
@ -0,0 +1,19 @@
|
||||
package lnx;
|
||||
|
||||
import leenkx.system.Event;
|
||||
|
||||
class SendEvent extends iron.Trait {
|
||||
|
||||
public function new() {
|
||||
|
||||
super();
|
||||
|
||||
var mouse = iron.system.Input.getMouse();
|
||||
|
||||
notifyOnUpdate(function() {
|
||||
if (mouse.started("left")) {
|
||||
Event.send("my_event");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user