public void GenerateSystem(Random pRandom, GraphicsDevice pGraphicsDevice, GameState pGameState) { String name = GenerateSystemName(pRandom); float distance = pRandom.Next(5, 100); SystemSolar newSystem = new SystemSolar(name, distance, pRandom, pGraphicsDevice); currentSystemSolar = newSystem; pGameState.currentSystem = newSystem; int count_stars = pRandom.Next(100, 200); for (int i = 0; i < count_stars; i++) { Vector2 newStarPosition = new Vector2(pRandom.Next(0, pGraphicsDevice.Viewport.Width), pRandom.Next(0, pGraphicsDevice.Viewport.Height)); list_backgroundStars.Add(newStarPosition); } }
public void Close() { currentSystemSolar = null; list_backgroundStars = new List <Vector2>(); myInterfaceManager.Clear(); }