예제 #1
0
 private void OnFindBuddyRes(short state, FindBuddyRes down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down != null)
     {
         UIManagerControl.Instance.HideUI("ChatUI");
         UIManagerControl.Instance.OpenUI("RoleShowUI", UINodesManager.NormalUIRoot, true, UIType.FullScreen);
         RoleShowUIViewModel.Instance.TextLv    = down.info.lv.ToString();
         RoleShowUIViewModel.Instance.TextName  = down.info.name;
         RoleShowUIViewModel.Instance.TextPower = down.info.fighting.ToString();
         RoleShowUIViewModel.Instance.ShowRoleModel(down.info.career, down.equipInfos, down.fashionList, down.wearWing);
         RoleShowUIViewModel.Instance.SetEquipItems(down.equipInfos);
         ActorPropertyUI actorPropertyUI = UIManagerControl.Instance.OpenUI("ActorPropertyUI", RoleShowUIView.Instance.PanelProperty, false, UIType.NonPush) as ActorPropertyUI;
         actorPropertyUI.RefreshUI(down);
         RoleShowUIViewModel.Instance.level = down.info.lv;
         RoleShowUIViewModel.Instance.BuddyPetFormations = down.petFormation;
     }
 }
예제 #2
0
    public void RefreshUI(FindBuddyRes down)
    {
        this.Awake();
        if (down == null)
        {
            return;
        }
        this.TextAtk.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.Atk, down.infoExt.atk, "ff7d4b"));
        this.TextDefence.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.Defence, down.infoExt.defence, "ff7d4b"));
        this.TextHpLmt.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HpLmt, down.infoExt.hp, "ff7d4b"));
        this.TextHurtAddRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HurtAddRatio, down.infoExt.hurtAddRatio, "ff7d4b"));
        this.TextHurtDeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HurtDeRatio, down.infoExt.hurtDeRatio, "ff7d4b"));
        this.TextHitRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.HitRatio, down.infoExt.hitRatio, "ff7d4b"));
        this.TextDodgeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DodgeRatio, down.infoExt.dodgeRatio, "ff7d4b"));
        this.TextCritRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.CritRatio, down.infoExt.critRatio, "ff7d4b"));
        this.TextCritHurtAddRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.CritHurtAddRatio, down.infoExt.critHurtAddRatio, "ff7d4b"));
        this.TextParryRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.ParryRatio, down.infoExt.parryRatio, "ff7d4b"));
        this.TextParryHurtDeRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.ParryHurtDeRatio, down.infoExt.parryHurtDeRatio, "ff7d4b"));
        this.TextDeparryRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DeparryRatio, down.infoExt.deparryRatio, "ff7d4b"));
        this.TextDecritRatio.set_text(AttrUtility.GetStandardDesc(GameData.AttrType.DecritRatio, down.infoExt.decritRatio, "ff7d4b"));
        this.TextMoveSpeed.set_text(string.Empty);
        this.TextHpRestore.set_text(string.Empty);
        this.TextLV.set_text("Lv" + down.info.lv);
        this.TextExp.set_text(down.infoExt.exp + "/" + down.infoExt.expLmt);
        float x;

        if (down.infoExt.expLmt == 0L)
        {
            x = 0f;
        }
        else
        {
            x = 375f * ((float)down.infoExt.exp / (float)down.infoExt.expLmt);
        }
        Vector2 sizeDelta = this.ImageProgress.GetComponent <RectTransform>().get_sizeDelta();

        sizeDelta.x = x;
        this.ImageProgress.GetComponent <RectTransform>().set_sizeDelta(sizeDelta);
    }