feat: add hero stats panel

This commit is contained in:
k0t9i
2023-01-29 23:38:42 +04:00
parent f8b0b4b894
commit a8adf23959
5 changed files with 149 additions and 1 deletions

View File

@@ -18,6 +18,28 @@ namespace Client.Domain.ValueObjects
public uint Cp { get => cp; set { if (value != cp) { cp = value; OnPropertyChanged("Cp"); } } }
public uint MaxCp { get => maxCp; set { if (value != maxCp) { maxCp = value; OnPropertyChanged("MaxCp"); } } }
public double HpPercent
{
get
{
return maxHp != 0 ? hp / (double)maxHp * 100 : 0;
}
}
public double MpPercent
{
get
{
return maxMp != 0 ? mp / (double)maxMp * 100 : 0;
}
}
public double CpPercent
{
get
{
return maxCp != 0 ? cp / (double)maxCp * 100 : 0;
}
}
public VitalStats(uint hp, uint maxHp, uint mp, uint maxMp, uint cp, uint maxCp)
{
this.hp = hp;