コード例 #1
0
 /// <summary>
 /// Copies pending shots to player shots
 /// </summary>
 public void IncludePendingShots()
 {
     while (PendingShots.Count > 0)
     {
         PlayerShots.Add(PendingShots.Dequeue());
     }
 }
コード例 #2
0
ファイル: GameModel.cs プロジェクト: tombby11/portfolio
        /// <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);
        }