示例#1
0
    public string GetProgressDescByStrongerType(StrongerType type)
    {
        string empty = string.Empty;
        int    lv    = EntityWorld.Instance.EntSelf.Lv;
        DangQianDengJiLiLunZhanLi dangQianDengJiLiLunZhanLi = DataReader <DangQianDengJiLiLunZhanLi> .Get(lv);

        if (dangQianDengJiLiLunZhanLi == null)
        {
            return(empty);
        }
        int id  = 0;
        int id2 = 0;

        switch (type)
        {
        case StrongerType.Equip:
            id2 = dangQianDengJiLiLunZhanLi.equipExplain;
            break;

        case StrongerType.EquipStrength:
            id2 = dangQianDengJiLiLunZhanLi.strengthenExplain;
            break;

        case StrongerType.EquipStarUp:
            id2 = dangQianDengJiLiLunZhanLi.equipStarExplain;
            break;

        case StrongerType.EquipEnchantment:
            id2 = dangQianDengJiLiLunZhanLi.enchantExplain;
            break;

        case StrongerType.Gem:
            id2 = dangQianDengJiLiLunZhanLi.diamondExplain;
            break;

        case StrongerType.Wing:
            id2 = dangQianDengJiLiLunZhanLi.wingExplain;
            break;

        case StrongerType.PetLevel:
            id2 = dangQianDengJiLiLunZhanLi.petLvExplain;
            break;

        case StrongerType.PetUpgrade:
            id2 = dangQianDengJiLiLunZhanLi.petStarExplain;
            break;

        case StrongerType.GodSoldier:
            id2 = dangQianDengJiLiLunZhanLi.shenBingExplain;
            break;
        }
        BianQiangJieMianPeiZhi bianQiangJieMianPeiZhi = DataReader <BianQiangJieMianPeiZhi> .Get((int)type);

        if (bianQiangJieMianPeiZhi != null)
        {
            id = bianQiangJieMianPeiZhi.name3;
        }
        return(GameDataUtils.GetChineseContent(id, false) + ": <color=#ff7d4b>" + GameDataUtils.GetChineseContent(id2, false) + "</color>");
    }
示例#2
0
    private void RefreshUI()
    {
        this.myPowerText.set_text(EntityWorld.Instance.EntSelf.Fighting.ToString());
        int lv = EntityWorld.Instance.EntSelf.Lv;
        DangQianDengJiLiLunZhanLi dangQianDengJiLiLunZhanLi = DataReader <DangQianDengJiLiLunZhanLi> .Get(lv);

        if (dangQianDengJiLiLunZhanLi != null)
        {
            this.standardPowerText.set_text(dangQianDengJiLiLunZhanLi.idealStrength.ToString());
        }
        this.UpdateStrongerListUI();
    }
示例#3
0
    public int GetStandardFightingByStrongerType(StrongerType type)
    {
        int result = 0;
        int lv     = EntityWorld.Instance.EntSelf.Lv;
        DangQianDengJiLiLunZhanLi dangQianDengJiLiLunZhanLi = DataReader <DangQianDengJiLiLunZhanLi> .Get(lv);

        if (dangQianDengJiLiLunZhanLi == null)
        {
            return(result);
        }
        switch (type)
        {
        case StrongerType.Equip:
            result = dangQianDengJiLiLunZhanLi.equip;
            break;

        case StrongerType.EquipStrength:
            result = dangQianDengJiLiLunZhanLi.strengthen;
            break;

        case StrongerType.EquipStarUp:
            result = dangQianDengJiLiLunZhanLi.equipStar;
            break;

        case StrongerType.EquipEnchantment:
            result = dangQianDengJiLiLunZhanLi.enchant;
            break;

        case StrongerType.Gem:
            result = dangQianDengJiLiLunZhanLi.diamond;
            break;

        case StrongerType.Wing:
            result = dangQianDengJiLiLunZhanLi.wing;
            break;

        case StrongerType.PetLevel:
            result = dangQianDengJiLiLunZhanLi.petLv;
            break;

        case StrongerType.PetUpgrade:
            result = dangQianDengJiLiLunZhanLi.petStar;
            break;

        case StrongerType.GodSoldier:
            result = dangQianDengJiLiLunZhanLi.shenBing;
            break;
        }
        return(result);
    }
示例#4
0
    public void UpdateItem(StrongerInfoData info)
    {
        if (!this.isInit)
        {
            this.InitUI();
        }
        this.systemID = info.SystemID;
        BianQiangJieMianPeiZhi bianQiangJieMianPeiZhi = DataReader <BianQiangJieMianPeiZhi> .Get((int)info.Type);

        DangQianDengJiLiLunZhanLi dangQianDengJiLiLunZhanLi = DataReader <DangQianDengJiLiLunZhanLi> .Get(EntityWorld.Instance.EntSelf.Lv);

        if (bianQiangJieMianPeiZhi == null)
        {
            return;
        }
        if (dangQianDengJiLiLunZhanLi == null)
        {
            return;
        }
        if (bianQiangJieMianPeiZhi.icon > 0)
        {
            ResourceManager.SetSprite(this.iconImg, GameDataUtils.GetIcon(bianQiangJieMianPeiZhi.icon));
        }
        this.nameText.set_text(GameDataUtils.GetChineseContent(bianQiangJieMianPeiZhi.name2, false));
        this.nameDescText.set_text(GameDataUtils.GetChineseContent(bianQiangJieMianPeiZhi.name, false) + ":" + StrongerManager.Instance.GetStandardFightingByStrongerType(info.Type));
        float num = StrongerManager.Instance.GetProgressByStrongerType(info.Type);

        if (num >= 1f)
        {
            num = 1f;
        }
        this.progressNumText.set_text(StrongerManager.Instance.GetFightingByStrongerType(info.Type).ToString());
        if ((double)num < 0.31)
        {
            ResourceManager.SetSprite(this.progressImage, ResourceManager.GetIconSprite("x_schedule02"));
        }
        else if ((double)num < 0.71)
        {
            ResourceManager.SetSprite(this.progressImage, ResourceManager.GetIconSprite("x_schedule01"));
        }
        else
        {
            ResourceManager.SetSprite(this.progressImage, ResourceManager.GetIconSprite("x_schedule03"));
        }
        this.progressImage.set_fillAmount(num);
        this.progressDescText.set_text(StrongerManager.Instance.GetProgressDescByStrongerType(info.Type));
    }