示例#1
0
 private void LoadStatsInfo(BaseStats charStats)
 {
     specificMemberInfo.SetActive(true);
     partyMember.charName.text     = characterSelected.GetCharName().ToUpper();
     partyMember.level.text        = "LVL " + characterSelected.GetLevel();
     partyMember.charSprite.sprite = characterSelected.GetSprite();
     partyMember.charType.text     = charStats.GetStatType().ToString().ToUpper();
     if (charStats.GetStatusCondition() == StatusCondition.None)
     {
         partyMember.statusCondition.gameObject.SetActive(false);
     }
     else
     {
         partyMember.statusCondition.text = charStats.GetStatusCondition().ToString().ToUpper();
     }
     partyMember.hp.text                    = charStats.GetStat(StatsAtributte.Health) + "/" + charStats.GetStat(StatsAtributte.MaxHealth);
     partyMember.sp.text                    = charStats.GetStat(StatsAtributte.SkillPoints) + "/" + charStats.GetStat(StatsAtributte.MaxSkillPoints);
     partyMember.atack.text                 = charStats.GetStat(StatsAtributte.Attack).ToString();
     partyMember.defense.text               = charStats.GetStat(StatsAtributte.Defense).ToString();
     partyMember.magicAttack.text           = charStats.GetStat(StatsAtributte.MagicAttack).ToString();
     partyMember.magicDefense.text          = charStats.GetStat(StatsAtributte.MagicDefense).ToString();
     partyMember.lucky.text                 = charStats.GetStat(StatsAtributte.Lucky).ToString();
     partyMember.speed.text                 = charStats.GetStat(StatsAtributte.Speed).ToString();
     partyMember.xpToLevelUp.text           = charStats.GetStat(StatsAtributte.ExperienceReward) + "/" + charStats.GetStat(StatsAtributte.ExperienceToLevelUp).ToString();
     partyMember.xpToLevelUpSlider.maxValue = charStats.GetStat(StatsAtributte.ExperienceToLevelUp);
     partyMember.xpToLevelUpSlider.value    = charStats.GetStat(StatsAtributte.ExperienceReward);
 }
示例#2
0
 public void LoadPartyPanels()
 {
     if (playerTeam == null)
     {
         playerTeam = GameObject.FindWithTag("Player").GetComponent <PlayerTeam>();
     }
     if (playerTeam != null)
     {
         CharacterSheet[] team = playerTeam.GetPlayerTeam();
         if (team != null)
         {
             for (int i = 0; i < team.Length; i++)
             {
                 if (team[i] != null)
                 {
                     partyPanels[i].SetActive(true);
                     BaseStats currentStats = team[i].GetStats();
                     partyMemberInfo[i].name.text         = team[i].GetCharName().ToUpper();
                     partyMemberInfo[i].type.text         = currentStats.GetStatType().ToString().ToUpper();
                     partyMemberInfo[i].level.text        = "LVL " + currentStats.GetLevel();
                     partyMemberInfo[i].hp.text           = currentStats.GetStat(StatsAtributte.Health) + "/" + currentStats.GetStat(StatsAtributte.MaxHealth);
                     partyMemberInfo[i].hpSlider.maxValue = currentStats.GetStat(StatsAtributte.MaxHealth);
                     partyMemberInfo[i].hpSlider.value    = currentStats.GetStat(StatsAtributte.Health);
                     partyMemberInfo[i].sp.text           = currentStats.GetStat(StatsAtributte.SkillPoints) + "/" + currentStats.GetStat(StatsAtributte.MaxSkillPoints);;
                     partyMemberInfo[i].spSlider.maxValue = currentStats.GetStat(StatsAtributte.MaxSkillPoints);
                     partyMemberInfo[i].spSlider.value    = currentStats.GetStat(StatsAtributte.SkillPoints);
                     partyMemberInfo[i].charImage.sprite  = team[i].GetSprite();
                     if (currentStats.GetStatusCondition() != StatusCondition.None)
                     {
                         partyMemberInfo[i].statusCondition.gameObject.SetActive(true);
                         partyMemberInfo[i].statusCondition.text = currentStats.GetStatusCondition().ToString().ToUpper();
                     }
                     else
                     {
                         partyMemberInfo[i].statusCondition.gameObject.SetActive(false);
                     }
                 }
                 else
                 {
                     partyPanels[i].SetActive(false);
                 }
             }
         }
     }
 }