public void SetData(UserMissionVo vo, MissionModel missionModel) { _data = vo; _missionPb = missionModel.GetMissionById(vo.MissionId); _titleNameText.text = _missionPb.MissionDesc; //任务名称 SetState(); SetProgress(); SetAwardData(); }
// private void OnGoBackToMain() // { // ModuleManager.Instance.GoBack(); // } // // // private void OnJumpToBuyWindow(string str) // { // int temp = 0; // // switch (str) // { // case "BuyEnergy": // temp = PropConst.PowerIconId; // QuickBuy.BuyGlodOrPorwer(temp, PropConst.GemIconId); // break; // case "BuyGold": // temp = PropConst.GoldIconId; // QuickBuy.BuyGlodOrPorwer(temp, PropConst.GemIconId); // break; // case "BuyEncouragePower": // temp = PropConst.EncouragePowerId; // QuickBuy.BuyGlodOrPorwer(temp, PropConst.GemIconId); // break; // // } // // //要等待他们购买金币成功的时候才需要返回! // // } private void ReceiveItemReward(UserMissionVo vo) { if (vo.Status == MissionStatusPB.StatusUnclaimed) { LoadingOverlay.Instance.Show(); // Debug.LogError("StatusUnclaimed"); _curPlayerPb = _missionModel.GetMissionById(vo.MissionId).Player; // Debug.LogError(vo.MissionId+" "+vo.MissionType); _replaceId = vo.MissionId; var buffer = NetWorkManager.GetByteData(new MissionAwardsReq() { MissionId = vo.MissionId, MissionType = vo.MissionType }); NetWorkManager.Instance.Send <MissionAwardsRes>(CMD.MISSION_AWARDS, buffer, OnGetAwardCallBack, OnGetAwardError); } }
public void SetData(UserMissionVo vo, MissionModel missionModel) { _data = vo; _missionPb = missionModel.GetMissionById(vo.MissionId); _titleNameText.text = _missionPb.MissionDesc; //任务名称 if (vo.IsPreview) { _preview.gameObject.Show(); _gotoTran.gameObject.Hide(); _getTran.gameObject.Hide(); _alreadyGetTran.gameObject.Hide(); } else { _preview.gameObject.Hide(); SetState(); } SetProgress(); SetAwardData(); }
private void StarListUpdateCallBack(GameObject gameObject, int index) { gameObject.GetComponent <AchievementItem>().SetData(_data[index], _missionModel.GetMissionById(_data[index].MissionId)); }
private void ListUpdateCallBack(GameObject go, int weight) { go.GetComponent <DailyTaskItem>().SetData(_data[weight], _missionModel.GetMissionById(_data[weight].MissionId)); }