示例#1
0
    /// <summary>
    /// 设置属性信息
    /// </summary>
    private void SetPropInfo()
    {
        float fight = 0;
        List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(-1, int.Parse(select_equip.itemID), select_equip.star, select_equip.strongLevel);

        for (int i = 0; i < prop_list.Count; i++)
        {
            EquipAddInfo info = prop_list[i];

            PropFightInfo prop_fight = PropChangeFightConfig.GetEquipInfo(info.prop_name);

            string  prop_name_label = string.Format("prop_name_{0}", i.ToString());
            UILabel prop_name       = UtilTools.GetChild <UILabel>(panel.equipProp, prop_name_label);
            prop_name.text = TextManager.GetUIString(info.prop_name);

            string  prop_txt_label = string.Format("prop_value_{0}", i.ToString());
            UILabel cur_prop_txt   = UtilTools.GetChild <UILabel>(panel.equipProp, prop_txt_label);
            float   prop_value     = GameConvert.FloatConvert((info.prop_base_value + info.prop_star_value + info.prop_strong_value));

            //cur_prop_txt.text = prop_fight.IsPercent==0?prop_value.ToString():string.Format("{0}%", prop_value*100);
            cur_prop_txt.text = prop_value.ToString();
            fight            += PropChangeFightConfig.GetPropForFightValue(info.prop_name, prop_value);
        }

        UILabel fight_txt = UtilTools.GetChild <UILabel>(panel.equipProp, "fight_value");

        fight_txt.text = GameConvert.IntConvert(fight).ToString();
    }
示例#2
0
    /// <summary>
    /// 设置属性信息
    /// </summary>
    private void SetPropInfo()
    {
        UISprite[] cur_star  = UtilTools.GetChilds <UISprite>(panel.prop_info, "star");
        UISprite[] next_star = UtilTools.GetChilds <UISprite>(panel.prop_info, "next_star");

        UtilTools.SetStar(cur_star_num, cur_star);
        UtilTools.SetStar(next_star_num, next_star);

        List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(0, cur_equip_info.id, cur_star_num, cur_strong_lv);

        for (int i = 0; i < prop_list.Count; i++)
        {
            EquipAddInfo info = prop_list[i];

            string  prop_name_label = string.Format("prop_name_{0}", i.ToString());
            UILabel prop_name       = UtilTools.GetChild <UILabel>(panel.prop_info, prop_name_label);
            prop_name.text = TextManager.GetUIString(info.prop_name);

            string  cur_prop_txt_label = string.Format("cur_prop_value_{0}", i.ToString());
            UILabel cur_prop_txt       = UtilTools.GetChild <UILabel>(panel.prop_info, cur_prop_txt_label);
            cur_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString();

            string  next_prop_txt_label = string.Format("next_prop_value_{0}", i.ToString());
            UILabel next_prop_txt       = UtilTools.GetChild <UILabel>(panel.prop_info, next_prop_txt_label);
            next_prop_txt.text = (info.prop_base_value + info.prop_next_strong_value + info.prop_next_star_value).ToString();
        }
    }
示例#3
0
    /// <summary>
    /// 设置属性信息
    /// </summary>
    public void SetPropInfo()
    {
        strong_info = EquipStrongConfig.GetEquipStrongInfo(cur_equip_info.star, cur_strong_lv);
        if (strong_info == null)
        {
            return;
        }

        panel.goldtext.text = strong_info.cost.ToString();

        List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(1, cur_equip_info.id, cur_star, cur_strong_lv);

        for (int i = 0; i < prop_list.Count; i++)
        {
            EquipAddInfo info = prop_list[i];

            string  prop_name_label = string.Format("prop_name_{0}", i.ToString());
            UILabel prop_name       = UtilTools.GetChild <UILabel>(panel.prop_info, prop_name_label);
            prop_name.text = TextManager.GetUIString(info.prop_name);

            string  cur_prop_txt_label = string.Format("cur_prop_value_{0}", i.ToString());
            UILabel cur_prop_txt       = UtilTools.GetChild <UILabel>(panel.prop_info, cur_prop_txt_label);
            cur_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString();

            string  next_prop_txt_label = string.Format("next_prop_value_{0}", i.ToString());
            UILabel next_prop_txt       = UtilTools.GetChild <UILabel>(panel.prop_info, next_prop_txt_label);
            next_prop_txt.text = (info.prop_base_value + info.prop_next_strong_value + info.prop_next_star_value).ToString();
        }
    }
示例#4
0
    private void ResultGrid_UpdateItem(UIGridItem item)
    {
        if (item == null || item.mScripts == null || item.oData == null)
        {
            return;
        }

        StrongResultData strong_info = item.oData as StrongResultData;

        UILabel   cur_lv     = item.mScripts[0] as UILabel;
        UILabel   next_lv    = item.mScripts[1] as UILabel;
        UILabel   crit_txt   = item.mScripts[2] as UILabel;
        EquipInfo equip_info = EquipConfig.GetEquipInfo(int.Parse(EquipMediator.cur_equip.itemID));

        crit_txt.gameObject.SetActive(strong_info.nextStrong - strong_info.preStrong > 1);
        cur_lv.text  = strong_info.preStrong.ToString();
        next_lv.text = strong_info.nextStrong.ToString();

        EquipAddInfo        info      = null;
        List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(-1, equip_info.id, EquipMediator.cur_equip.star, strong_info.preStrong);

        for (int i = 0; i < prop_list.Count; i++)
        {
            info = prop_list[i];

            string  prop_name_label = string.Format("prop_name_{0}", i.ToString());
            UILabel prop_name       = UtilTools.GetChild <UILabel>(item.transform, prop_name_label);
            prop_name.text = TextManager.GetUIString(info.prop_name);

            string  cur_prop_txt_label = string.Format("cur_prop_value_{0}", i.ToString());
            UILabel cur_prop_txt       = UtilTools.GetChild <UILabel>(item.transform, cur_prop_txt_label);
            cur_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString();
        }

        List <EquipAddInfo> next_prop_list = EquipConfig.GetPropAddDataListByID(-1, equip_info.id, EquipMediator.cur_equip.star, strong_info.nextStrong);

        for (int j = 0; j < next_prop_list.Count; j++)
        {
            info = next_prop_list[j];

            string  next_prop_txt_label = string.Format("next_prop_value_{0}", j.ToString());
            UILabel next_prop_txt       = UtilTools.GetChild <UILabel>(item.transform, next_prop_txt_label);
            next_prop_txt.text = (info.prop_base_value + info.prop_strong_value + info.prop_star_value).ToString();
        }
    }
示例#5
0
    private void SetInherit()
    {
        panel.goldtext.text = GetNeedEuro() + "";

        UISprite[] star_obj = UtilTools.GetChilds <UISprite>(panel.select_equip, "star");
        UtilTools.SetStar(select_equip_data.star, star_obj);

        UISprite color = UtilTools.GetChild <UISprite>(panel.select_equip, "color");

        color.spriteName = "color" + select_equip_data.star;

        UITexture icon = UtilTools.GetChild <UITexture>(panel.select_equip, "icon");

        LoadSprite.LoaderItem(icon, select_equip_data.itemID, false);


        next_strong_lv = select_equip_data.strongLevel - 10;
        strong_info    = EquipStrongConfig.GetEquipStrongInfo(cur_equip_info.star, next_strong_lv);
        if (strong_info == null)
        {
            return;
        }



        UILabel next_strong_txt = UtilTools.GetChild <UILabel>(panel.prop_info, "next_strong_lv");

        next_strong_txt.text = "Lv." + next_strong_lv.ToString();

        List <EquipAddInfo> prop_list = EquipConfig.GetPropAddDataListByID(-1, int.Parse(select_equip_data.itemID), cur_star, next_strong_lv);

        for (int i = 0; i < prop_list.Count; i++)
        {
            EquipAddInfo info = prop_list[i];

            string  next_prop_txt_label = string.Format("next_prop_value_{0}", i.ToString());
            UILabel next_prop_txt       = UtilTools.GetChild <UILabel>(panel.prop_info, next_prop_txt_label);
            next_prop_txt.text = (info.prop_base_value + info.prop_next_strong_value + info.prop_next_star_value).ToString();
        }
    }