Пример #1
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);
    }
Пример #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>
    /// 解析勋章奖励Xml数据
    /// </summary>
    private void InitPraseXmlData()
    {
        Dictionary <int, IExcelBean> _medalXmlData = DataTemplate.GetInstance().m_MedalexchangeTable.getData();

        foreach (var item in _medalXmlData)
        {
            MedalexchangeTemplate _medalData = item.Value as MedalexchangeTemplate;
            if (_medalData.getExchangeType() == 1)
            {
                m_GoldList.Add(_medalData);
            }
            else if (_medalData.getExchangeType() == 2)
            {
                m_SilverList.Add(_medalData);
            }
            else if (_medalData.getExchangeType() == 3)
            {
                m_BronzeList.Add(_medalData);
            }
            else if (_medalData.getExchangeType() == 4)
            {
                m_PigIronList.Add(_medalData);
            }
        }
    }
Пример #4
0
 /// <summary>
 /// 显示UI数据
 /// </summary>
 /// <param name="medalData"></param>
 public void ShowUIData(MedalexchangeTemplate medalData)
 {
     m_MedalData = medalData;
     ShowMedalTypeImg();
     ShowReardData();
     ShowIsFetch();
     InitDesTxt();
 }
Пример #5
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);
    }