to new git

This commit is contained in:
2022-05-04 23:50:07 +07:00
parent 290f5515b7
commit c8af0e5284
39 changed files with 720 additions and 359 deletions

View File

@ -9,17 +9,17 @@ public class CharacterCondition
public event Action<int> OnChangeAmmunitionEvent;
private int health;
public int HealthPoints
{
get
{
return health;
}
public int HealthPoints
{
get
{
return health;
}
private set
{
health = value;
OnChangeHealthEvent?.Invoke(value);
}
}
}
public int GetHealthPointsInQuantile()
@ -30,7 +30,7 @@ public class CharacterCondition
return 1;
else if (health < 75)
return 2;
else return 3;
else return 3;
}
private int armour;
public int ArmourPoints
@ -45,6 +45,17 @@ public class CharacterCondition
OnChangeArmourEvent?.Invoke(value);
}
}
public int GetArmourPointsInQuantile()
{
if (armour < 25)
return 0;
else if (armour < 50)
return 1;
else if (armour < 75)
return 2;
else return 3;
}
private int ammo;
public int Ammunition
{
@ -60,6 +71,11 @@ public class CharacterCondition
}
public CharacterCondition()
{
this.Reset();
}
public void Reset()
{
var settings = SettingsReader.Instance.GetSettings;
ammo = settings.MaxAmmo;