private void CreateBonus(ulong time) { if ((time + 10) % 20 != 0) { return; } Bonus = new GameBonus((BonusType)_random.Next((int)BonusType.Count - 1), _random.Next(Width - GameBonus.Width), -10 * GameBonus.Height); }
private void CreateAmmoBox(ulong time) { if (time % 20 != 0) { return; } AmmoBox = new GameBonus(BonusType.None, _random.Next(Width - GameBonus.Width), -GameBonus.Height); }
private static void CalculateSpeed(ulong time) { Barrier.CalculateSpeed(time); Player.CalculateSpeed(time); GameBonus.CalculateSpeed(time); }