simple eating )
This commit is contained in:
@@ -203,22 +203,28 @@ public class Player : MonoBehaviour
|
||||
|
||||
public void UpdateStatsByClock()
|
||||
{
|
||||
Stats[StatsId.Food].deduct(0.034m); // 48 hours it's 100, 100/2880=~0.034 per minute
|
||||
Stats[StatsId.Food].deduct(0.034f); // 48 hours it's 100, 100/2880=~0.034 per minute
|
||||
if (_currentAnimation != AnimationStates.Sleeping)
|
||||
{
|
||||
Stats[StatsId.Energy].deduct(0.1m); // 24 hours it's 100, 100/1440=~0.096 per minute
|
||||
Stats[StatsId.Energy].deduct(0.1f); // 24 hours it's 100, 100/1440=~0.096 per minute
|
||||
}
|
||||
else
|
||||
{
|
||||
Stats[StatsId.Energy].increase(1m);
|
||||
Stats[StatsId.Energy].increase(1f);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void BuyAction(IPlayerAction action)
|
||||
public void BuyObject(FoodObjectSO objectToBuy)
|
||||
{
|
||||
Stats[StatsId.Money].deduct(((ISellable)action).Price);
|
||||
action.ApplyAction(this);
|
||||
Stats[StatsId.Money].deduct(objectToBuy.objectPrice);
|
||||
//action.ApplyAction(this);
|
||||
}
|
||||
|
||||
public float Eat()
|
||||
{
|
||||
Stats[StatsId.Food].increase(10);
|
||||
return Stats[StatsId.Food].Value;
|
||||
}
|
||||
|
||||
private static string GetEnumMemberValue<T>(T value)
|
||||
|
||||
Reference in New Issue
Block a user