to new git
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user