private void LoadRockets(List <RocketDto> rockets) { foreach (var rDto in rockets) { var inf = RocketInformation.LoadFromName(rDto.Type); var rocket = new Rocket(rDto.Location, new Force(Angle.Zero, 0), new Acceleration(Angle.Zero, 0), rDto.Speed, rDto.Angle, rDto.ThrustPercentage, inf); _objects.Add(rocket); } }
public RocketInformation GetRocketInformation(ref JArray data, int?id) { RocketInformation rocketInfo = new RocketInformation(); rocketInfo.rocketID = (string)data[id]["rocket"]["rocket_id"]; rocketInfo.rocketName = (string)data[id]["rocket"]["rocket_name"]; rocketInfo.rocketType = (string)data[id]["rocket"]["rocket_type"]; return(rocketInfo); }