Beispiel #1
0
 /// <summary>
 /// Copies pending shots to player shots
 /// </summary>
 public void IncludePendingShots()
 {
     while (PendingShots.Count > 0)
     {
         PlayerShots.Add(PendingShots.Dequeue());
     }
 }
Beispiel #2
0
        /// <summary>
        ///     Creates a rocket shot by the player
        /// </summary>
        public void RocketShot(Point startingPoint)
        {
            if (GameOver)
            {
                return;
            }
            if (PlayerShots.Count >= MaximumPlayerShots)
            {
                return;
            }

            var shot = new Shot(startingPoint, Direction.Up, ShotType.Rocket);

            PlayerShots.Add(shot);
            TriggerShotMoved(shot, false);
        }