예제 #1
0
 /// <summary>
 /// 显示是否已经领取
 /// </summary>
 private void ShowIsFetch()
 {
     m_YetFetchObj.SetActive(false);
     GameUtils.SetBtnSpriteGrayState(m_FetchBtn, false);
     for (int i = 0; i < ObjectSelf.GetInstance().GetHandBookBoxList().Count; i++)
     {
         if (ObjectSelf.GetInstance().GetHandBookBoxList().Contains(m_MedalData.getId()))
         {
             m_YetFetchObj.SetActive(true);
             GameUtils.SetBtnSpriteGrayState(m_FetchBtn, true);
         }
     }
 }
예제 #2
0
        /// <summary>
        /// 是否显示勋章达成奖励跳转提示
        /// </summary>
        /// <returns>是 or 否</returns>
        private bool ShowMedalReardGotoObj()
        {
            Dictionary <int, IExcelBean> _medalXmlData = DataTemplate.GetInstance().m_MedalexchangeTable.getData();

            foreach (var item in _medalXmlData)
            {
                MedalexchangeTemplate _medalData = item.Value as MedalexchangeTemplate;
                if (ObjectSelf.GetInstance().GetHandBookBoxList().Contains(_medalData.getId()) == false)
                {
                    if (_medalData.getExchangeType() == 1 && ObjectSelf.GetInstance().HuangjinXZ >= _medalData.getNeedNum())
                    {
                        //UI_HomeControler.Inst.AddUI(UI_MedardGotoObj.UI_ResPath);
                        return(true);
                    }
                    else if (_medalData.getExchangeType() == 2 && ObjectSelf.GetInstance().BaiJinXZ >= _medalData.getNeedNum())
                    {
                        return(true);
                    }
                    else if (_medalData.getExchangeType() == 3 && ObjectSelf.GetInstance().QingTongXZ >= _medalData.getNeedNum())
                    {
                        return(true);
                    }
                    else if (_medalData.getExchangeType() == 4 && ObjectSelf.GetInstance().ChiTieXZ >= _medalData.getNeedNum())
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
예제 #3
0
    /// <summary>
    /// 显示新的勋章奖励New图标
    /// </summary>
    public static bool CheckNewMedalReard()
    {
        Dictionary <int, IExcelBean> _medalXmlData = DataTemplate.GetInstance().m_MedalexchangeTable.getData();

        foreach (var item in _medalXmlData)
        {
            MedalexchangeTemplate _medalData = item.Value as MedalexchangeTemplate;
            if (ObjectSelf.GetInstance().GetHandBookBoxList().Contains(_medalData.getId()) == false)
            {
                if (_medalData.getExchangeType() == 1 && ObjectSelf.GetInstance().HuangjinXZ >= _medalData.getNeedNum())
                {
                    return(true);
                }
                else if (_medalData.getExchangeType() == 2 && ObjectSelf.GetInstance().BaiJinXZ >= _medalData.getNeedNum())
                {
                    return(true);
                }
                else if (_medalData.getExchangeType() == 3 && ObjectSelf.GetInstance().QingTongXZ >= _medalData.getNeedNum())
                {
                    return(true);
                }
                else if (_medalData.getExchangeType() == 4 && ObjectSelf.GetInstance().ChiTieXZ >= _medalData.getNeedNum())
                {
                    return(true);
                }
            }
        }

        return(false);
    }
예제 #4
0
    private bool[] CheckNewMedalReard()
    {
        for (int i = 0; i < m_TipsResultArray.Length; i++)
        {
            m_TipsResultArray[i] = false;
        }
        Dictionary <int, IExcelBean> _medalXmlData = DataTemplate.GetInstance().m_MedalexchangeTable.getData();

        foreach (var item in _medalXmlData)
        {
            MedalexchangeTemplate _medalData = item.Value as MedalexchangeTemplate;
            var list = ObjectSelf.GetInstance().GetHandBookBoxList();
            if (!ObjectSelf.GetInstance().GetHandBookBoxList().Contains(_medalData.getId()))
            {
                int _exchangeType = _medalData.getExchangeType();
                if (m_TipsResultArray[_exchangeType - 1])
                {
                    continue;
                }
                switch (_exchangeType)
                {
                case 1:
                    m_TipsResultArray[0] = ObjectSelf.GetInstance().HuangjinXZ >= _medalData.getNeedNum();
                    break;

                case 2:
                    m_TipsResultArray[1] = ObjectSelf.GetInstance().BaiJinXZ >= _medalData.getNeedNum();
                    break;

                case 3:
                    m_TipsResultArray[2] = ObjectSelf.GetInstance().QingTongXZ >= _medalData.getNeedNum();
                    break;

                case 4:
                    m_TipsResultArray[3] = ObjectSelf.GetInstance().ChiTieXZ >= _medalData.getNeedNum();
                    break;

                default:
                    break;
                }
                if (m_TipsResultArray[0] & m_TipsResultArray[1] & m_TipsResultArray[2] & m_TipsResultArray[3])
                {
                    break;
                }
            }
        }
        return(m_TipsResultArray);
    }