start using tinker
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package kernel;
|
||||
|
||||
import cc.OS;
|
||||
import lua.Coroutine;
|
||||
import util.EventBus;
|
||||
|
||||
using lua.Table;
|
||||
@@ -10,7 +9,9 @@ using lua.Table;
|
||||
Class for interacting with the native pullEvent system.
|
||||
**/
|
||||
class KernelEvents{
|
||||
public static final instance:KernelEvents = new KernelEvents();
|
||||
public static var instance:KernelEvents;
|
||||
|
||||
@:allow(kernel.Init)
|
||||
private function new () {}
|
||||
|
||||
private var eventBus: util.EventBus<Array<Dynamic>> = new EventBus();
|
||||
@@ -33,15 +34,15 @@ class KernelEvents{
|
||||
}
|
||||
}
|
||||
|
||||
public function on(eventName:String, callback:Array<Dynamic> -> Void):EventBusListner<Array<Dynamic>> {
|
||||
public function on(eventName:String, callback:Array<Dynamic> -> Void):EventBusListner {
|
||||
return eventBus.on(eventName,callback);
|
||||
}
|
||||
|
||||
public function once(eventName:String, callback:Array<Dynamic> -> Void):EventBusListner<Array<Dynamic>> {
|
||||
public function once(eventName:String, callback:Array<Dynamic> -> Void):EventBusListner {
|
||||
return eventBus.once(eventName,callback);
|
||||
}
|
||||
|
||||
public function removeListner(id:EventBusListner<Array<Dynamic>>) {
|
||||
public function removeListner(id:EventBusListner) {
|
||||
return eventBus.removeListner(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user