コード例 #1
0
        // ===================== Setup work =====================
        public override void SpawnSetup(Map map, bool respawningAfterLoad)
        {
            base.SpawnSetup(map, respawningAfterLoad);

            if (respawningAfterLoad == false)
            {
                this.pawnsAboard.AddRange(Expedition.GenerateExpeditionPawns(this.Map));
            }
        }
コード例 #2
0
 // ===================== Setup work =====================
 public override void SpawnSetup(Map map, bool respawningAfterLoad)
 {
     base.SpawnSetup(map, respawningAfterLoad);
     if ((this.teamIsDropped == false) &&
         (this.pawnsAboard.Count == pilotsNumber))
     {
         this.pawnsAboard.AddRange(Expedition.GenerateExpeditionPawns(this.Map));
     }
 }
コード例 #3
0
        protected override bool TryExecuteWorker(IncidentParms parms)
        {
            Map map = (Map)parms.target;
            Building_LandingPad landingPad = Util_LandingPad.GetBestAvailableLandingPadReachingMapEdge(map);

            if (landingPad == null)
            {
                // Should not happen if CanFireNowSub returned true.
                return(false);
            }

            // Spawn landing dispatcher spaceship.
            FlyingSpaceshipLanding dispatcherSpaceship = Util_Spaceship.SpawnLandingSpaceship(landingPad, SpaceshipKind.DispatcherPick);

            // Spawn expedition team.
            List <Pawn> teamPawns = Expedition.GenerateExpeditionPawns(map);

            if (Rand.Value < 0.2f)
            {
                ApplyInjuriesOrIllnessToTeam(map, teamPawns);
            }
            return(SpawnTeamOnMapEdge(landingPad.Position, map, teamPawns));
        }