simple eating )
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
public class Stat
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public decimal Value { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public decimal Quantity { get; set; }
|
||||
public float Value { get; set; }
|
||||
public float Price { get; set; }
|
||||
public float Quantity { get; set; }
|
||||
public float MaxValue { get; set; }
|
||||
|
||||
public Stat(string name, decimal startValue)
|
||||
public Stat(string name, float startValue, float maxValue)
|
||||
{
|
||||
Name = name;
|
||||
Value = startValue;
|
||||
MaxValue = maxValue;
|
||||
}
|
||||
|
||||
public Stat(string name, decimal price, decimal quantity)
|
||||
public Stat(string name, float price, float quantity, float maxValue)
|
||||
{
|
||||
Name = name;
|
||||
Price = price;
|
||||
Quantity = quantity;
|
||||
MaxValue = maxValue;
|
||||
}
|
||||
|
||||
public void increase(decimal byAmount)
|
||||
public void increase(float byAmount)
|
||||
{
|
||||
Value += byAmount;
|
||||
}
|
||||
|
||||
public bool deduct(decimal amount)
|
||||
public bool deduct(float amount)
|
||||
{
|
||||
if (Value >= amount)
|
||||
{
|
||||
@@ -33,7 +36,7 @@ public class Stat
|
||||
return false;
|
||||
}
|
||||
|
||||
public void forceDeduct(decimal amount)
|
||||
public void forceDeduct(float amount)
|
||||
{
|
||||
Value -= amount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user