Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public class Game1 : Game
  2. {
  3. [...]
  4. private void ShootLaser()
  5. {
  6. int width = 20;
  7. int height = 50;
  8. Rectangle rect = new Rectangle(_playerShip.Rectangle.X + _playerShip.Rectangle.Width / 2 - width / 2,
  9. _playerShip.Rectangle.Y, width, height);
  10.  
  11. var laser = new Laser(rect, _laserTexture);
  12. _playerSipLasers.Add(laser);
  13. }
  14.  
  15. private void MovePlayerLasers()
  16. {
  17. foreach (var laser in _playerSipLasers)
  18. laser.MoveUp();
  19. }
  20.  
  21. [...]
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement