/// <summary> /// 绑定各游戏命令的监听 /// </summary> static void BindGameCommandListener() { QKCommand.RegListener(GameCommand.ShowPayUI.Name, OnShowPayUI); QKCommand.RegListener(GameCommand.QuickLogin.Name, OnQuickLogin); QKCommand.RegListener(GameCommand.RequestLogin.Name, OnRequestLogin); QKCommand.RegListener(GameCommand.RequestRegist.Name, OnRequestRegist); }
/// <summary> /// 添加一个事件监听 /// </summary> public void RegQKCommandListener(string eventName) { // 监听QKCommand QKCommand.RegListener(eventName, OnQKCommand); }
/// <summary> /// 绑定命令监听 /// </summary> void BindCommandListener() { QKCommand.RegListener(SDKCommand.SDKLoginFinish.Name, OnSDKLoginFinished); }
void Awake() { mSingle = this; QKCommand.RegListener(SDKCommand.ShowLoginUI.Name, OnShowLoginUI); QKCommand.RegListener(SDKCommand.SDKLoginFinish.Name, OnSDKLoginFinished); }