Exemplo n.º 1
0
        /// <summary>
        /// Generate VehicleSkyfaller with preassigned <paramref name="vehicle"/>
        /// </summary>
        /// <param name="def"></param>
        /// <param name="vehicle"></param>
        public static VehicleSkyfaller MakeSkyfaller(ThingDef def, VehiclePawn vehicle)
        {
            VehicleSkyfaller skyfaller = (VehicleSkyfaller)ThingMaker.MakeThing(def);

            skyfaller.vehicle = vehicle;
            return(skyfaller);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Generate VehicleSkyfaller with newly generated vehicle
        /// </summary>
        /// <param name="def">test</param>
        /// <param name="vehicleDef"></param>
        /// <param name="faction"></param>
        public static VehicleSkyfaller MakeSkyfaller(ThingDef def, VehicleDef vehicleDef, Faction faction, bool randomizeColors = false, bool randomizeMask = false, bool cleanSlate = true)
        {
            VehicleSkyfaller skyfaller = (VehicleSkyfaller)ThingMaker.MakeThing(def);

            skyfaller.vehicle = VehicleSpawner.GenerateVehicle(new VehicleGenerationRequest(vehicleDef, faction, randomizeColors, randomizeMask, cleanSlate));
            return(skyfaller);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Landing animation is finished
 /// </summary>
 /// <param name="map"></param>
 /// <returns></returns>
 public virtual bool FinishedLanding(VehicleSkyfaller skyfaller)
 {
     return(ticksPassed <= 0);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Takeoff animation has finished
 /// </summary>
 /// <returns></returns>
 public virtual bool FinishedTakeoff(VehicleSkyfaller skyfaller)
 {
     return(ticksPassed >= launchProperties.maxTicks);
 }
Exemplo n.º 5
0
 public override bool FinishedLanding(VehicleSkyfaller skyfaller)
 {
     return((!drawPos.InBounds(skyfaller.Map) && !liftOff) || (drawPos.InBounds(skyfaller.Map) && acceleration <= 0.01f));
 }
Exemplo n.º 6
0
 public override bool FinishedTakeoff(VehicleSkyfaller skyfaller)
 {
     return(!drawPos.InBounds(skyfaller.Map) && drawPos != Vector3.zero);
 }