示例#1
0
 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);
     }
 }
示例#2
0
        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);
        }