/// <summary>
 /// Gets a random firing delay between MIN_FIRING_DELAY and
 /// MIN_FIRING_DELY + FIRING_RATE_RANGE
 /// </summary>
 /// <returns>the random firing delay</returns>
 private int GetRandomFiringDelay()
 {
     return(GameConstants.BEAR_MIN_FIRING_DELAY +
            RandomNumberGenerator.Next(GameConstants.BEAR_FIRING_RATE_RANGE));
 }
 /// <summary>
 /// Gets a random location using the given min and range
 /// </summary>
 /// <param name="min">the minimum</param>
 /// <param name="range">the range</param>
 /// <returns>the random location</returns>
 private int GetRandomLocation(int min, int range)
 {
     return(min + RandomNumberGenerator.Next(range));
 }
Beispiel #3
0
 /// <summary>
 /// Gets a random firing delay between MIN_FIRING_DELAY and
 /// MIN_FIRING_DELY + FIRING_RATE_RANGE
 /// </summary>
 /// <returns>the random firing delay</returns>
 private int GetRandomFiringDelay()
 {
     return(GameConstants.BearMinFiringDelay +
            RandomNumberGenerator.Next(GameConstants.BearFiringRateRange));
 }