public void RspTask(GameMsg msg) { PlayerData playerData = GameRoot.Instance.PlayerData; RspTask taskData = msg.rspTask; GameRoot.AddTipsToQueue("任务奖励 金币+" + curAutoGuideCfg.coin + " 经验+" + curAutoGuideCfg.exp, Constant.ColorRed); switch (curAutoGuideCfg.actID) { case 0: //与智者对话 break; case 1: //进入副本 EnterFuBen(); break; case 2: //进入强化 OpenStrongWindow(); break; case 3: //进入体力购买 OpenPurchaseWindow(0); break; case 4: //进入金币制造 OpenPurchaseWindow(1); break; case 5: //进入世界聊天 OpenChatWindow(); break; } //更新信息 GameRoot.Instance.SetPlayerDataByRspTask(taskData); //更新UI mainCityWindow.RefreshUI(); roleInfoWindow.RefreshUI(); if (msg.pshTaskProgs != null) { GameRoot.Instance.SetPlayerDataByPshTaskProgs(msg.pshTaskProgs); if (taskWindow.gameObject.activeInHierarchy) { taskWindow.RefreshUI(); } } }
public void RspGuide(GameMsg msg) { RspGuide data = msg.rspGuide; int addCoint = data.coin - GameRoot.Instance.PlayerData.coin; int addExp = data.addExp; GameRoot.AddTips(Constans.ColorStr("任务奖励 金币: " + addCoint + " 经验值: " + addExp, TxtColor.Blue)); switch (curTaskData.actID) { case 0: // 与智者对话 break; case 1: // 进入副本 EnterMission(); break; case 2: // 进入强化界面 OpenStrongWindow(); break; case 3: // 购买体力 OpenBuyWindow(0); break; case 4: // 进入铸造界面 OpenBuyWindow(1); break; case 5: // 进行世界聊天 OpenChatWindow(); break; } GameRoot.Instance.SetPlayerDataByGuide(data); mainCityWindow.RefreshUI(); if (msg.pshTaskPrgs != null) { PshTaskPrgs(msg); } }