fix stats
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
public class Stat
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public float Value { get; set; }
|
||||
public float Price { get; set; }
|
||||
public float Quantity { get; set; }
|
||||
public float MaxValue { get; set; }
|
||||
public string Name { get; private set; }
|
||||
public float Value { get; private set; }
|
||||
public float Price { get; private set; }
|
||||
public float Quantity { get; private set; }
|
||||
public float MaxValue { get; private set; }
|
||||
|
||||
public Stat(string name, float startValue, float maxValue)
|
||||
{
|
||||
@@ -23,7 +23,10 @@ public class Stat
|
||||
|
||||
public void increase(float byAmount)
|
||||
{
|
||||
Value += byAmount;
|
||||
if (Value < MaxValue)
|
||||
{
|
||||
Value += byAmount;
|
||||
}
|
||||
}
|
||||
|
||||
public bool deduct(float amount)
|
||||
|
||||
Reference in New Issue
Block a user