update
This commit is contained in:
24
call_hx/Sources/lnx/Plugin.hx
Normal file
24
call_hx/Sources/lnx/Plugin.hx
Normal file
@ -0,0 +1,24 @@
|
||||
package lnx;
|
||||
|
||||
// Expose this class for easy access from JS
|
||||
|
||||
@:expose
|
||||
class Plugin extends iron.Trait {
|
||||
|
||||
var update:Void->Void = null;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
notifyOnUpdate(function() {
|
||||
if (update != null) update();
|
||||
});
|
||||
}
|
||||
|
||||
public function hello() {
|
||||
trace("world");
|
||||
}
|
||||
|
||||
public function scene() {
|
||||
return iron.Scene.active;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user