AttackPanel.ShowStats C# (CSharp) Method

ShowStats() public method

public ShowStats ( Unit, unit, bool isAlly ) : void
unit Unit,
isAlly bool
return void
    public void ShowStats(Unit unit, bool isAlly)
    {
        if (unit != null)
        {
            blueBacker.SetActive(isAlly);
            redBacker.SetActive(!isAlly);
            nameLabel.text = unit.name;
            hpLabel.text = string.Format("HP {0}/{1}", unit.HP, unit.MaxHP);
            mpLabel.text = string.Format("MP {0}/{1}", unit.MP, unit.MaxMP);
            lvLabel.text = string.Format("LV. {0}", unit.Lvl);
            apLabel.text = string.Format("AP {0}/{1}", unit.AP, unit.MaxAP);
        }
        Toggle(unit != null);
    }

Usage Example

Example #1
0
 public void ShowDefenderStats(Unit unit)
 {
     defenderPanel.ShowStats(unit, heroes.Contains(unit));
 }
All Usage Examples Of AttackPanel::ShowStats
AttackPanel