feat: add more info to target panel

This commit is contained in:
k0t9i
2023-01-31 20:18:10 +04:00
parent 24e6c4a180
commit 4dc08f3139
7 changed files with 184 additions and 75 deletions

View File

@@ -11,6 +11,7 @@ namespace Client.Domain.Entities
public interface CreatureInterface : INotifyPropertyChanged
{
uint Id { get; set; }
VitalStats VitalStats { get; set; }
Transform Transform { get; set; }
string Name { get; }
string BriefInfo { get; }

View File

@@ -15,6 +15,7 @@ namespace Client.Domain.Entities
{
private FullName fullName;
private Phenotype phenotype;
private VitalStats vitalStats = new VitalStats(0, 0, 0, 0, 0, 0);
public uint Id { get; set; }
public Transform Transform { get; set; }
@@ -58,6 +59,8 @@ namespace Client.Domain.Entities
}
}
public VitalStats VitalStats { get => vitalStats; set => vitalStats = value; }
public Player(uint id, Transform transform, FullName fullName, Phenotype phenotype)
{
Id = id;

View File

@@ -1,4 +1,5 @@
using Client.Domain.Common;
using System;
namespace Client.Domain.ValueObjects
{
@@ -11,8 +12,8 @@ namespace Client.Domain.ValueObjects
private uint cp;
private uint maxCp;
public uint Hp { get => hp; set { if (value != hp) { hp = value; OnPropertyChanged("Hp"); } } }
public uint MaxHp { get => maxHp; set { if (value != maxHp) { maxHp = value; OnPropertyChanged("MaxHp"); } } }
public uint Hp { get => hp; set { if (value != hp) { hp = value; OnPropertyChanged("Hp"); OnPropertyChanged("MaxHp"); } } }
public uint MaxHp { get => Math.Max(hp, maxHp); set { if (value != maxHp) { maxHp = value; OnPropertyChanged("MaxHp"); } } }
public uint Mp { get => mp; set { if (value != mp) { mp = value; OnPropertyChanged("Mp"); } } }
public uint MaxMp { get => maxMp; set { if (value != maxMp) { maxMp = value; OnPropertyChanged("MaxMp"); } } }
public uint Cp { get => cp; set { if (value != cp) { cp = value; OnPropertyChanged("Cp"); } } }