public void ShowChestWindow(tagChestActionEvent pChest) { tagChestInfo pChestInfo = PlayerRole.Instance.ChestManager.GetNowActionChest(); if (pChestInfo == null) { return; } if (pChest.IsReset) { OnReset(); m_byStoreBoxs = pChest.ChestSum; ShowBg(); Transform tfTemp = m_Obj_Chest.transform.GetChild(0).GetChild(2); tfTemp.GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("ChestWindBg_Anim"), 0, 1.0f); tfTemp.GetChild(1).GetComponent <Animator>().Play(Animator.StringToHash("DownSprite_Anim"), 0, 1.0f); tfTemp.GetChild(2).GetComponent <Animator>().Play(Animator.StringToHash("UpperSprite_Anim"), 0, 1.0f); tfTemp.GetChild(3).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("Dummy(1)_Anim"), 0, 1.0f); tfTemp.GetChild(4).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("Item2_Anim"), 0, 1.0f); tfTemp.GetChild(5).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("Item3_Anim"), 0, 1.0f); tfTemp.GetChild(6).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("Item4_Anim"), 0, 1.0f); tfTemp.GetChild(7).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("FreeAlpha_Anim"), 0, 1.0f); tfTemp.GetChild(8).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("FreeAlpha_Anim"), 0, 1.0f); tfTemp.GetChild(9).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("FreeAlpha_Anim"), 0, 1.0f); tfTemp.GetChild(10).GetChild(0).GetComponent <Animator>().Play(Animator.StringToHash("FreeAlpha_Anim"), 0, 1.0f); //显示未开的 DoShow(pChest.ActionChest.ChestTypeID, pChest.ActionChest.ActionTime, pChest.ActionChest.ChestOnlyID, true); //开过的 if (pChest.ActionChest.ChestArray != null) { for (byte i = 0; i < pChest.ActionChest.ChestArray.Count; i++) { ChestOnceStates pOpen = pChest.ActionChest.ChestArray[i]; OnOpenBox(true, pOpen.Index, pOpen.RewardID, pOpen.RewardOnlyID, false); } } } else { Message pMessage = new Message(); pMessage.m_msgtype = MsgType.SHOW; pMessage.m_byparam1 = pChestInfo.ChestTypeID; pMessage.m_byparam2 = pChestInfo.ActionTime;// - Utility.GetTickCount())/1000); pMessage.m_byparam3 = pChestInfo.ChestOnlyID; m_MessageList.Add(pMessage); } }
bool HandleGetChestReward(NetCmdBase obj) { LC_Cmd_GetChestReward ncb = (LC_Cmd_GetChestReward)obj; tagUserOperationEvent pUOM = new tagUserOperationEvent((ncb.Result ? UserOperateMessage.UOM_Chest_OpenChest_Sucess : UserOperateMessage.UOM_Chest_OpenChest_Failed_6)); MsgEventHandle.HandleMsg(pUOM); if (ActionChestInfo == null) { return(false); } tagChestInfo pChest = ActionChestInfo; if (pChest.ChestOnlyID != ncb.ChestOnlyID) { return(false); } if (!FishConfig.Instance.m_ChestInfo.ChestMap[pChest.ChestTypeID].RewardInfo.RewardMap.ContainsKey(ncb.ChestStates.RewardID)) { return(false); } if (!FishConfig.Instance.m_ChestInfo.ChestMap[pChest.ChestTypeID].RewardInfo.RewardMap[ncb.ChestStates.RewardID].RewardLog.ContainsKey(ncb.ChestStates.RewardOnlyID)) { return(false); } tagChestsRewardOnce pOnce = FishConfig.Instance.m_ChestInfo.ChestMap[pChest.ChestTypeID].RewardInfo.RewardMap[ncb.ChestStates.RewardID].RewardLog[ncb.ChestStates.RewardOnlyID]; if (ncb.Result) { pChest.OpenSum += 1; ChestOnceStates pChestOnce = new ChestOnceStates(); pChestOnce = ncb.ChestStates; tagChestRewardEvent pEvent = new tagChestRewardEvent(pChestOnce); MsgEventHandle.HandleMsg(pEvent); } return(true); }
public tagChestRewardEvent(ChestOnceStates ChestOnceStates) : base(MsgEventType.MET_Chest_Reward) { this.ChestOnceStates = ChestOnceStates; }