예제 #1
0
 //Gets the remaining amount to capacity, divides it by current positive delta.
 public static int TimeToMax(Resource input)
 {
     return (int)Math.Ceiling(((input.MaxAmount - input.Amount) / input.PerTick.Delta));
 }
예제 #2
0
 //Divides current amount by negative delta
 public static int TimeToZero(Resource input)
 {
     return (int)Math.Ceiling((input.Amount / input.PerTick.Delta));
 }