void onBtnQuitGame(GameObject go) { if (Application.platform == RuntimePlatform.IPhonePlayer) { AnyPlotformSDK.Call_Cmd("close"); } else { GameSdkMgr.record_quit(); } }
void Update() { if (do_sum_CD && A3_SummonModel.getInstance().getSumCds().ContainsKey((int)A3_SummonModel.getInstance().lastatkID)) { refresh_sumCd(A3_SummonModel.getInstance().getSumCds()[(int)A3_SummonModel.getInstance().lastatkID]); } if (Input.GetKeyDown(KeyCode.Escape)) { GameSdkMgr.record_quit(); } }
public void Cmd_CallBack(Variant v) { debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!"); InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING); IOSPlatformSDK.m_bInCalling = false; int num = v["result"]; debug.Log(num.ToString()); bool flag = num < 3; if (flag) { this._inited = num; } else { bool flag2 = num == 11 || num == 12 || num == 13; if (flag2) { bool flag3 = IOSPlatformSDK.m_bLogined && num == 11; if (flag3) { IOSPlatformSDK.m_nResetAppCount = 1; } else { IOSPlatformSDK.LOGIN_ACTION(v); } } else { bool flag4 = num == 42; if (flag4) { GameSdkMgr.record_quit(); AnyPlotformSDK.Call_Cmd("close", null, null, true); } else { bool flag5 = num == 21; if (flag5) { GameSdkMgr.record_quit(); IOSPlatformSDK.m_nResetAppCount = 1; } } } } }
public void Cmd_CallBack(Variant v) { debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!"); //InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING); m_bInCalling = false; int result = v["result"]; debug.Log(result.ToString()); if (result < 3) { _inited = result; } else if (result == 11 || result == 12 || result == 13)//登录游戏 { if (m_bLogined && result == 11) { //切换账号 m_nResetAppCount = 1; } else { LOGIN_ACTION(v); } } else if (result == 42)//退出游戏 { GameSdkMgr.record_quit(); AnyPlotformSDK.Call_Cmd("close"); // Application.Quit(); } else if (result == 21)//登出 { GameSdkMgr.record_quit(); m_nResetAppCount = 1; //Application.Quit(); } }
void OnCreateChar(GameEvent e) { Variant data = e.data; debug.Log(data["res"]._int.ToString()); debug.Log(data.dump()); if (data["res"]._int == -153) { flytxt.instance.fly(ContMgr.getCont("a3_createcha_tongming")); } if (data["res"]._int > 0) { uint cid = data["cha"]["cid"]._uint; PlayerModel.getInstance().cid = cid; // LGPlatInfo.inst.logSDKAP("roleCreate"); InterfaceMgr.getInstance().close(InterfaceMgr.A3_CREATECHA); InterfaceMgr.getInstance().DisposeUI(InterfaceMgr.A3_CREATECHA); PlayerModel.getInstance().profession = chooseTab.getSeletedIndex() + 2; PlayerModel.getInstance().name = nameInput.text; GameSdkMgr.record_createRole(data["cha"]); //当创建角色成功,先不要进入游戏 //debug.Log("当创建角色成功,先不要进入游戏,进入单机副本"); SelfRole.s_bStandaloneScene = true; //资源会再前面加载,这里必须使用异步加载 map_loading InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.MAP_LOADING); //InterfaceMgr.getInstance().ui_async_open("joystick"); //InterfaceMgr.getInstance().ui_async_open("skillbar"); InterfaceMgr.getInstance().ui_async_open("a1_gamejoy"); LGMap lgmap = GRClient.instance.g_gameM.getObject(OBJECT_NAME.LG_MAP) as LGMap; lgmap.EnterStandalone(); MediaClient.instance.StopMusic(); //MediaClient.instance.clearMusic(); //if (debug.instance != null) // debug.instance.showMsg(ContMgr.getOutGameCont("debug4"), 3); } }
public static void init() { if (_instance == null) { _instance = new GameSdkMgr(); switch (Globle.QSMY_SDK_Index) { case ENUM_SDK_PLATFORM.QISJ_QUICK: m_sdk = new GameSdk_quick(); break; case ENUM_SDK_PLATFORM.QISJ_RYJTDREAM: m_sdk = new GameSdk_ryjtDream(); break; case ENUM_SDK_PLATFORM.DL_SDK: m_sdk = new GameSdk_DL(); break; } } }
public static void init() { bool flag = GameSdkMgr._instance == null; if (flag) { GameSdkMgr._instance = new GameSdkMgr(); ENUM_SDK_PLATFORM qSMY_SDK_Index = Globle.QSMY_SDK_Index; if (qSMY_SDK_Index != ENUM_SDK_PLATFORM.QISJ_QUICK) { if (qSMY_SDK_Index == ENUM_SDK_PLATFORM.QISJ_RYJTDREAM) { GameSdkMgr.m_sdk = new GameSdk_ryjtDream(); } } else { GameSdkMgr.m_sdk = new GameSdk_quick(); } } }
private void OnCreateChar(GameEvent e) { Variant data = e.data; Debug.Log(data["res"]._int); Debug.Log(data.dump()); bool flag = data["res"]._int == -153; if (flag) { flytxt.instance.fly("已存在同名角色", 0, default(Color), null); } bool flag2 = data["res"]._int > 0; if (flag2) { uint @uint = data["cha"]["cid"]._uint; ModelBase <PlayerModel> .getInstance().cid = @uint; InterfaceMgr.getInstance().close(InterfaceMgr.A3_CREATECHA); InterfaceMgr.getInstance().destory(InterfaceMgr.A3_CREATECHA); ModelBase <PlayerModel> .getInstance().profession = this.chooseTab.getSeletedIndex() + 2; ModelBase <PlayerModel> .getInstance().name = this.nameInput.text; GameSdkMgr.record_createRole(data["cha"]); SelfRole.s_bStandaloneScene = true; InterfaceMgr.getInstance().open(InterfaceMgr.MAP_LOADING, null, false); InterfaceMgr.getInstance().open("joystick", null, false); InterfaceMgr.getInstance().open("skillbar", null, false); LGMap lGMap = GRClient.instance.g_gameM.getObject("LG_MAP") as LGMap; lGMap.EnterStandalone(); MediaClient.instance.StopMusic(); MediaClient.instance.clearMusic(); } }
void onEnsure(rechargeData dta) { GameSdkMgr.Pay(dta); }
public void Cmd_CallBack(Variant v) { //发送的请求返回了 这里现只处理充值 debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!" + v.dump()); int result = v["result"]; //if (result != 85) // InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING); m_bInCalling = false; if (result == 11 || result == 12 || result == 13)//登录游戏 { if (m_bLogined && result == 11) { //切换账号 m_nResetAppCount = 1; } else { LOGIN_ACTION(v); } } else if (result == 43)//退出游戏 { GameSdkMgr.record_quit(); //AnyPlotformSDK.Call_Cmd("close"); // Application.Quit(); } else if (result == 21)//登出 { debug.Log("登出回调!!!!!"); AnyPlotformSDK.Call_Cmd("resetapp"); //GameSdkMgr.record_quit(); //AnyPlotformSDK.Call_Cmd("loginout"); m_nResetAppCount = 1; //Application.Quit(); } else if (result == 61) //切换 { //AnyPlotformSDK.Call_Cmd("switchAccount"); } else if (result == 81)//开始录音 { Variant data = v["data"]; GameSdkMgr.m_sdk.voiceRecordHanlde("begin", "", 0); } else if (result == 82)//开始录音失败 { Variant data = v["data"]; if (data.ContainsKey("error")) { GameSdkMgr.m_sdk.voiceRecordHanlde("error", data["error"], 0); return; } } else if (result == 83)//结束录音 { Variant data = v["data"]; GameSdkMgr.m_sdk.voiceRecordHanlde("end", data["url"], data["seconds"]); } else if (result == 84)//结束录音失败 { Variant data = v["data"]; if (data.ContainsKey("error")) { GameSdkMgr.m_sdk.voiceRecordHanlde("error", data["error"], 0); return; } } else if (result == 91)//播放语音失败 { GameSdkMgr.m_sdk.voicePlayedHanlde("error"); } else if (result == 92)//播放结束 { // if (GameSdkMgr.playedHanlde != null) GameSdkMgr.m_sdk.voicePlayedHanlde("played"); } }
public void Cmd_CallBack(Variant v) { debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!Cmd_CallBack!!!!!" + v.dump()); int num = v["result"]; bool flag = num != 85; if (flag) { InterfaceMgr.getInstance().close(InterfaceMgr.SDK_LOADING); } AndroidPlotformSDK.m_bInCalling = false; bool flag2 = num == 11 || num == 12 || num == 13; if (flag2) { bool flag3 = AndroidPlotformSDK.m_bLogined && num == 11; if (flag3) { AndroidPlotformSDK.m_nResetAppCount = 1; } else { AndroidPlotformSDK.LOGIN_ACTION(v); } } else { bool flag4 = num == 42; if (flag4) { GameSdkMgr.record_quit(); AnyPlotformSDK.Call_Cmd("close", null, null, true); } else { bool flag5 = num == 21; if (flag5) { GameSdkMgr.record_quit(); AndroidPlotformSDK.m_nResetAppCount = 1; } else { bool flag6 = num == 81; if (flag6) { Variant variant = v["data"]; GameSdkMgr.m_sdk.voiceRecordHanlde("begin", "", 0); } else { bool flag7 = num == 82; if (flag7) { Variant variant2 = v["data"]; bool flag8 = variant2.ContainsKey("error"); if (flag8) { GameSdkMgr.m_sdk.voiceRecordHanlde("error", variant2["error"], 0); } } else { bool flag9 = num == 83; if (flag9) { Variant variant3 = v["data"]; GameSdkMgr.m_sdk.voiceRecordHanlde("end", variant3["url"], variant3["seconds"]); } else { bool flag10 = num == 84; if (flag10) { Variant variant4 = v["data"]; bool flag11 = variant4.ContainsKey("error"); if (flag11) { GameSdkMgr.m_sdk.voiceRecordHanlde("error", variant4["error"], 0); } } else { bool flag12 = num == 91; if (flag12) { GameSdkMgr.m_sdk.voicePlayedHanlde("error"); } else { bool flag13 = num == 92; if (flag13) { GameSdkMgr.m_sdk.voicePlayedHanlde("played"); } } } } } } } } } }