public Player CreatePlayer(Point2D[] points, Point2D creationPoint, Point2D[] bulletPoints, int bulletLifeTime, Point2D[] laserPoints, int maxLaserBullets, int laserLifeTime)
 {
     Player          = new Player(points, creationPoint, bulletPoints, bulletLifeTime, laserPoints, laserLifeTime, maxLaserBullets, 500);
     Player.Destroy += OnDestroy;
     Player.Fire    += AddBullet;
     CreateGameObject?.Invoke(this, Player);
     return(Player);
 }
        public Enemy CreateUFO(Point2D[] points, Point2D creationPoint)
        {
            Enemy enemy = new UFO(Player, points, creationPoint);

            enemy.Destroy += OnDestroy;
            enemy.Rotate(180);
            enemy.Speed = _enemiesSpeed;
            _enemies.Add(enemy);
            CreateGameObject?.Invoke(this, enemy);
            return(enemy);
        }
        public Enemy CreateAsteroid(Point2D[] points, Point2D creationPoint)
        {
            Enemy enemy = new Asteroid(points, creationPoint);

            enemy.Rotation = _rnd.Next(0, 360);
            enemy.Destroy += OnDestroy;
            enemy.Speed    = _enemiesSpeed;
            _enemies.Add(enemy);
            CreateGameObject?.Invoke(this, enemy);
            return(enemy);
        }
 public void AddBullet(object sender, Ammunition bullet)
 {
     bullet.Destroy += OnDestroy;
     _bullets.Add(bullet);
     CreateGameObject?.Invoke(this, bullet);
 }