void ShowReward(bool bImmediately, byte byIndex, byte byRewardid, byte byChestOnceID, bool bOpened) { tagChestsRewardOnce pOnce = FishConfig.Instance.m_ChestInfo.ChestMap[m_byChestTypeID].RewardInfo.RewardMap[byRewardid].RewardLog[byChestOnceID]; tagRewardOnce pReward = FishConfig.Instance.m_RewardConfig.RewardMap[pOnce.RewardID]; if (pReward.RewardItemVec.Count != 1) { Debug.Log("物品不唯一"); } tagItemOnce pItem = pReward.RewardItemVec[0]; tagItemConfig pItemConfig = FishConfig.Instance.m_ItemInfo.m_ItemMap[pItem.ItemID]; m_BtnInfo[byIndex].m_sprBg.spriteName = "ChestPropertyNum"; m_BtnInfo[byIndex].m_goItem.SetActive(true); m_BtnInfo[byIndex].m_sprItem.spriteName = pItemConfig.ItemIcon.ToString(); if (!bImmediately) { if (bOpened) { m_BtnInfo[byIndex].m_goOpenEff.SetActive(true); } else { m_BtnInfo[byIndex].m_goItem.GetComponent <Animator>().SetBool(Animator.StringToHash("ItemScale"), true); } } m_BtnInfo[byIndex].m_goDiamond.SetActive(false); m_BtnInfo[byIndex].m_goLabelNormal.SetActive(true); m_BtnInfo[byIndex].m_labelNormal.text = pItem.ItemSum.ToString(); }
public void ShowTipBox_0(TipBox_0.TipBox_0_ZiTi ZiTiType, float LifeTime, ushort uRewardid1, ushort uRewardid2 = 0) { if (bShowTipBox_0) { return; } bShowTipBox_0 = true; //解析奖励 tagItemOnce[] pItems = new tagItemOnce[3]; for (int i = 0; i < pItems.Length; i++) { pItems[i] = new tagItemOnce(); } byte Index = 0; tagRewardOnce pReward; if (FishConfig.Instance.m_RewardConfig.RewardMap.TryGetValue(uRewardid1, out pReward)) { for (byte i = 0; i < pReward.RewardItemVec.Count; i++) { if (Index < pItems.Length) { pItems[Index++] = pReward.RewardItemVec[i]; } } } if (FishConfig.Instance.m_RewardConfig.RewardMap.TryGetValue(uRewardid2, out pReward)) { for (byte i = 0; i < pReward.RewardItemVec.Count; i++) { if (Index < pItems.Length) { pItems[Index++] = pReward.RewardItemVec[i]; } } } m_TipBox_0.InitGameObject(ZiTiType, LifeTime, pItems, Index); // ShowMask(true, 12); }