feat: add view models for all entities
This commit is contained in:
@@ -1,16 +1,28 @@
|
||||
namespace Client.Domain.ValueObjects
|
||||
using Client.Domain.Common;
|
||||
|
||||
namespace Client.Domain.ValueObjects
|
||||
{
|
||||
public class ExperienceInfo
|
||||
public class ExperienceInfo : NotifyPropertyChanged
|
||||
{
|
||||
public uint Level { get; set; }
|
||||
public uint Exp { get; set; }
|
||||
public uint Sp { get; set; }
|
||||
private uint level;
|
||||
private uint exp;
|
||||
private uint sp;
|
||||
|
||||
public uint Level { get => level; set { if (value != level) { level = value; OnPropertyChanged("Level"); OnPropertyChanged("ExpToLevel"); } } }
|
||||
public uint Exp { get => exp; set { if (value != exp) { exp = value; OnPropertyChanged("Exp"); } } }
|
||||
public uint Sp { get => sp; set { if (value != sp) { sp = value; OnPropertyChanged("Sp"); } } }
|
||||
public uint ExpToLevel {
|
||||
get
|
||||
{
|
||||
return level * 200;
|
||||
}
|
||||
}
|
||||
|
||||
public ExperienceInfo(uint level, uint exp, uint sp)
|
||||
{
|
||||
Level = level;
|
||||
Exp = exp;
|
||||
Sp = sp;
|
||||
this.level = level;
|
||||
this.exp = exp;
|
||||
this.sp = sp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user