[dev_arch_opt_3.0] 优化魔方

This commit is contained in:
lixiaopeng
2023-02-21 18:33:27 +08:00
parent b192238894
commit 1b1724668c
6 changed files with 275 additions and 227 deletions

View File

@@ -0,0 +1,21 @@
package com.mogo.eagle.core.function.call.mofang
import com.mogo.eagle.core.function.api.mofang.IMoGoMoFangListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 魔方按键的处理
*/
object CallerMofangListenerManager : CallerBase<IMoGoMoFangListener>() {
fun invokeMofangHandle(keyCode: Int, action: Int): Boolean {
var isConsume = false
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
if (listener.onMofangHandle(keyCode, action))
isConsume = true
}
return isConsume
}
}