Exemplo n.º 1
0
 public void AddAsteroid(Random random)
 {
     Asteroid astroid = new Asteroid(AsteroidTexture1, AsteroidTexture2, AsteroidTexture3, AsteroidTexture4);
     astroid.Initialize(random.Next(1, 5));
     astroid.Position = new Vector2(Game1.ViewPortWidth + astroid.Texture.Width / 2, random.Next(100, (int)Game1.ViewPortHeight - 100));
     Asteroids.Add(astroid);
 }
Exemplo n.º 2
0
 public void SplitAsteroid(int size, Vector2 position)
 {
     Asteroid astroid = new Asteroid(AsteroidTexture1, AsteroidTexture2, AsteroidTexture3, AsteroidTexture4);
     astroid.Initialize(size);
     astroid.Position = position;
     Asteroids.Add(astroid);
 }