Ejemplo n.º 1
0
 /// <summary>
 /// Generate VehicleSkyfaller_FlyOver with preassigned <paramref name="vehicle"/> from <paramref name="start"/> to <paramref name="end"/>
 /// </summary>
 /// <param name="def"></param>
 /// <param name="vehicle"></param>
 /// <param name="start"></param>
 /// <param name="end"></param>
 /// <returns></returns>
 public static VehicleSkyfaller_FlyOver MakeSkyfallerFlyOver(ThingDef def, VehiclePawn vehicle, IntVec3 start, IntVec3 end)
 {
     try
     {
         VehicleSkyfaller_FlyOver skyfaller = (VehicleSkyfaller_FlyOver)MakeSkyfaller(def, vehicle);
         skyfaller.start = start;
         skyfaller.end   = end;
         skyfaller.angle = start.AngleToPoint(end);
         return(skyfaller);
     }
     catch (Exception ex)
     {
         Log.Error($"Unable to generate VehicleSkyfaller of type <type>{def.thingClass}</type>. Exception=\"{ex.Message}\"");
     }
     return(null);
 }