override public List <GameObject> SetValueOfGameObjects() { List <GameObject> gameObjects = new List <GameObject>(); centerPlanet = new Planet(); gameObjects.Add(centerPlanet); centerPlanet.image = MainWindow.window.Planet; rocket = new Rocket(); gameObjects.Add(rocket); rocket.image = MainWindow.window.Rocket; rocket.Y = -400; rocket.Angle = 0; rocket.phisObj.speed = Gravitation.CosmicSpeeds(rocket.phisObj, centerPlanet.phisObj, 1); fire = new ReactiveGases(rocket); fire.image = MainWindow.window.Fire; gameObjects.Add(fire); playingBorder = new PlayingBorder(centerPlanet, rocket); playingBorder.image = MainWindow.window.Border; gameObjects.Add(playingBorder); meteors = SetValueOfMeteors(); gameObjects = gameObjects.Concat(meteors).ToList(); return(gameObjects); }
override public List <GameObject> SetValueOfGameObjects() { List <GameObject> gameObjects = new List <GameObject>(); countOfMeteors = 350; centerPlanet = new Planet(); gameObjects.Add(centerPlanet); centerPlanet.phisObj.angulVel = -2 * Math.PI / 500; centerPlanet.image = MainWindow.window.CenterStar; planets = new List <Planet>(); for (int i = 0; i < countOfPlanets; i++) { planets.Add(new Planet()); gameObjects.Add(planets[i]); planets[i].image = MainWindow.Clone(MainWindow.window.SmallPlanet); MainWindow.window.PlayingCanvas.Children.Add(planets[i].image); planets[i].phisObj.mass = centerPlanet.phisObj.mass / 100; planets[i].phisObj.coord = centerPlanet.phisObj.coord + Coord.FromPolar(500 + 400, 2 * Math.PI / countOfPlanets * i); planets[i].phisObj.speed = Gravitation.CosmicSpeeds(planets[i].phisObj, centerPlanet.phisObj, 1); } rocket = new Rocket(); gameObjects.Add(rocket); rocket.image = MainWindow.window.Rocket; rocket.Y = -400; rocket.Angle = 0; rocket.phisObj.speed = Gravitation.CosmicSpeeds(rocket.phisObj, centerPlanet.phisObj, 1); fire = new ReactiveGases(rocket); fire.image = MainWindow.window.Fire; gameObjects.Add(fire); playingBorder = new PlayingBorder(centerPlanet, rocket); playingBorder.image = MainWindow.window.Border; gameObjects.Add(playingBorder); meteors = SetValueOfMeteors(); gameObjects = gameObjects.Concat(meteors).ToList(); return(gameObjects); }