kernel events handle in own func

This commit is contained in:
Djeeberjr 2022-03-01 12:57:03 +01:00
parent 639392c6de
commit 2402eb1a44

View File

@ -138,6 +138,11 @@ class KernelEvents {
var eventName:String = event[1]; var eventName:String = event[1];
fireSignal(eventName,event);
}
}
private function fireSignal(eventName: String,event:Table<Int, Dynamic> ) {
switch eventName { switch eventName {
case "alarm": case "alarm":
this.onAlarmTrigger.trigger(event[2]); this.onAlarmTrigger.trigger(event[2]);
@ -211,7 +216,6 @@ class KernelEvents {
Log.error("Unknown cc event: " + eventName); Log.error("Unknown cc event: " + eventName);
} }
} }
}
private static function ccButtonToEnum(button:Dynamic):ButtonType { private static function ccButtonToEnum(button:Dynamic):ButtonType {
switch button { switch button {