public void Draw(SpriteBatch spriteBatch) { var i = 0; RandomPlanets.ForEach(randomAsteroid => { Sheet.SelectedFrame = i.ToString(); Sheet.Position.X = randomAsteroid.Position.X; Sheet.Position.Y = randomAsteroid.Position.Y; Sheet.Rotation.Rotation = randomAsteroid.Rotation.Rotation; Sheet.Scale = randomAsteroid.Scale; Sheet.Color = randomAsteroid.Color; Sheet.Draw(spriteBatch); i++; }); }
public override void Update(GameTime time) { RandomPlanets.ForEach(randomAsteroid => randomAsteroid.Update(time)); ForEach(obj => obj.Update(time)); }