private void Fire(Invader theShooter) { //Centralize the origin of the shot to the center front of the ship Point gunOfShip = new Point((theShooter.Area.Right + theShooter.Area.Left) / 2, theShooter.Area.Bottom); enemyShots.Add(new Shot(gunOfShip, false, boundaries)); }
public void Fire() { //Centralize the origin of the shot to the center front of the ship Point gunOfShip = new Point(location.X + image.Width / 2 - 2, location.Y - image.Height); //Only allow addition of shots if the total number of shots by the player is less than 5 if (playerShots.numberOfShots() < 5) { playerShots.Add(new Shot(gunOfShip, true, boundaries)); } }