コード例 #1
0
        private static List <ISpaceCraft> BuildDeltaHeavy(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var demoSat = new ParkerSolarProbe(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius) + config.PositionOffset,
                                               planet.Velocity + new DVector2(-400, 0) + config.VelocityOffset, config.PayloadMass);

            var fairingLeft  = new DIVH5mFairing(craftDirectory, demoSat.Position, DVector2.Zero, true);
            var fairingRight = new DIVH5mFairing(craftDirectory, demoSat.Position, DVector2.Zero, false);

            demoSat.AttachFairings(fairingLeft, fairingRight);

            var dhS1 = new CommonBoosterCore(craftDirectory, DVector2.Zero, DVector2.Zero);
            var dhS2 = new DIVHS2(craftDirectory, DVector2.Zero, DVector2.Zero, 7.2);
            var dhS3 = new Star48PAM(craftDirectory, DVector2.Zero, DVector2.Zero, 3);

            var dhLeftBooster  = new SideBooster(craftDirectory, 1, DVector2.Zero, DVector2.Zero);
            var dhRightBooster = new SideBooster(craftDirectory, 2, DVector2.Zero, DVector2.Zero);

            demoSat.AddChild(dhS3);
            dhS3.SetParent(demoSat);
            dhS3.AddChild(dhS2);
            dhS2.SetParent(dhS3);
            dhS2.AddChild(dhS1);
            dhS1.SetParent(dhS2);
            dhS1.AddChild(dhLeftBooster);
            dhS1.AddChild(dhRightBooster);
            dhLeftBooster.SetParent(dhS1);
            dhRightBooster.SetParent(dhS1);

            return(new List <ISpaceCraft>
            {
                demoSat, dhS3, dhS2, dhLeftBooster, dhS1, dhRightBooster, fairingLeft, fairingRight
            });
        }
コード例 #2
0
ファイル: MissionModel.cs プロジェクト: forzenheart/OtomeBall
    public void setCfg(MissionConfig cfg)
    {
        _id     = Convert.ToInt32(cfg.id);
        _title  = (string)cfg.title;
        _desc   = (string)cfg.desc;
        _status = status.UNFINISH;

        int[] infoIds = cfg.battleInfoId;
        int   size    = infoIds.Length;

        _battleInfoIds = new int[size];

        for (int i = 0; i < size; i++)
        {
            int id = Convert.ToInt32(infoIds [i]);
            _battleInfoIds [i] = id;
        }

        int[] dialogueIds = cfg.dialogueId;
        size = dialogueIds.Length;
        _dialogueModelIds = new int[size];

        for (int i = 0; i < size; i++)
        {
            int id = Convert.ToInt32(dialogueIds [i]);
            _dialogueModelIds [i] = id;
        }
    }
コード例 #3
0
        private static List <ISpaceCraft> BuildSLS(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var demoSat = new EuropaClipper(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius) + config.PositionOffset,
                                            planet.Velocity + new DVector2(-400, 0) + config.VelocityOffset, config.PayloadMass);

            var fairingLeft  = new SLS5mFairing(craftDirectory, demoSat.Position, DVector2.Zero, true);
            var fairingRight = new SLS5mFairing(craftDirectory, demoSat.Position, DVector2.Zero, false);

            demoSat.AttachFairings(fairingLeft, fairingRight);

            var slsS1 = new SLSS1(craftDirectory, DVector2.Zero, DVector2.Zero);
            var slsS2 = new SLSS2(craftDirectory, DVector2.Zero, DVector2.Zero, 9.9);

            var slsLeftBooster  = new SLSBooster(craftDirectory, 1, DVector2.Zero, DVector2.Zero);
            var slsRightBooster = new SLSBooster(craftDirectory, 2, DVector2.Zero, DVector2.Zero);

            demoSat.AddChild(slsS2);
            slsS2.SetParent(demoSat);
            slsS2.AddChild(slsS1);
            slsS1.SetParent(slsS2);
            slsS1.AddChild(slsLeftBooster);
            slsS1.AddChild(slsRightBooster);
            slsLeftBooster.SetParent(slsS1);
            slsRightBooster.SetParent(slsS1);

            return(new List <ISpaceCraft>
            {
                demoSat, slsS2, slsLeftBooster, slsS1, slsRightBooster, fairingLeft, fairingRight
            });
        }
コード例 #4
0
        private static List <ISpaceCraft> BuildElectron(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var kickStage = new ElectronKickStage(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius),
                                                  planet.Velocity + new DVector2(-400, 0), config.PayloadMass);

            var leftFairing  = new ElectronFairing(craftDirectory, kickStage.Position, DVector2.Zero, true);
            var rightFairing = new ElectronFairing(craftDirectory, kickStage.Position, DVector2.Zero, false);

            kickStage.AttachFairings(leftFairing, rightFairing);

            var leftBattery  = new ElectronBattery(craftDirectory, kickStage.Position, DVector2.Zero, true);
            var rightBattery = new ElectronBattery(craftDirectory, kickStage.Position, DVector2.Zero, false);

            kickStage.AttachBatteries(leftBattery, rightBattery);

            var electronS1 = new ElectronS1(craftDirectory, DVector2.Zero, DVector2.Zero);
            var electronS2 = new ElectronS2(craftDirectory, DVector2.Zero, DVector2.Zero);

            kickStage.AddChild(electronS2);
            electronS2.SetParent(kickStage);
            electronS2.AddChild(electronS1);
            electronS1.SetParent(electronS2);

            return(new List <ISpaceCraft>
            {
                kickStage, electronS2, leftBattery, rightBattery, electronS1, leftFairing, rightFairing
            });
        }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override string Execute()
        {
            var indexer = SearchFactory <SearchDocument> .AssetIndexer;

            if (indexer == null)
            {
                return("Indexer not configured");
            }

            OnStatusChanged(string.Format("Starting Crawl at {0:hh mm ss tt}", DateTime.Now));

            try
            {
                var crawler = new AssetCrawler <SearchDocument>(indexer);

                var configData = MissionConfig.GetConfigData();

                var results = crawler.RunCrawler(StatusCallback);

                MissionConfig.SetLastAssetCrawlDate(configData, DateTime.Now, results.Duration);

                return(string.Format("Crawl Finished. {0} assets crawled. {4} Errors. {5} Warnings. Duration ({1:00}:{2:00}:{3:00})", results.TotalCnt, results.Duration.Hours, results.Duration.Minutes, results.Duration.Seconds, results.ErrorCnt, results.WarningCnt));
            }
            catch (Exception ex)
            {
                OnStatusChanged("failed");

                return(string.Format("{0} {1}", ex.Message, ex.StackTrace));
            }
        }
コード例 #6
0
        internal int GetMissionsExpReward(int missionId, int userLevel)
        {
            int           result = 0;
            MissionConfig mc     = MissionConfigProvider.Instance.GetDataById(missionId);

            if (null != mc)
            {
                Data_SceneDropOut dropOutConfig = SceneConfigProvider.Instance.GetSceneDropOutById(mc.DropId);
                if (null != dropOutConfig)
                {
                    if (mc.MissionType == (int)MissionType.DAILY && dropOutConfig.m_Exp > 0)
                    {
                        if (userLevel < 21)
                        {
                            // 21级以下
                            result = 120;
                        }
                        else if (userLevel < 24)
                        {
                            // 24级以下
                            result = userLevel * 15;
                        }
                        else
                        {
                            result = (int)((0.0097 * Math.Pow(userLevel, 4) - 1.6977 * Math.Pow(userLevel, 3) + 106.88 * Math.Pow(userLevel, 2) - 2523.5 * userLevel + 19699) * 1);
                        }
                    }
                    else
                    {
                        result = dropOutConfig.m_Exp;
                    }
                }
            }
            return(result);
        }
コード例 #7
0
        /// <summary>
        /// Called when a scheduled job executes
        /// </summary>
        /// <returns>A status message to be stored in the database log and visible from admin mode</returns>
        public override string Execute()
        {
            var indexer = SearchFactory <SearchDocument> .ContentIndexer;

            if (indexer == null)
            {
                return("Indexer not configured");
            }

            OnStatusChanged(string.Format("Starting Crawl at {0:hh mm ss tt}", DateTime.Now));

            var configData = MissionConfig.GetConfigData();

            var contentCrawler = new ContentCrawler <SearchDocument>(indexer, new CrawlerSettings()
            {
                PageScrapper  = new PageScrapper(),
                ExcludedPages = TypeParser.ParseCSVIntList(configData.CrawlerPageExclusions),
            });

            var results = contentCrawler.RunCrawler(StatusCallback, configData.LastContentCrawledDate);

            MissionConfig.SetLastContentCrawlDate(configData, DateTime.Now, results.Duration);

            OnStatusChanged("Done");

            return(string.Format("Crawl Finished. {0} pages crawled. Total Errors {4}. Duration ({1:00}:{2:00}:{3:00}) ", results.TotalCnt, results.Duration.Hours, results.Duration.Minutes, results.Duration.Seconds, results.ErrorCnt));
        }
コード例 #8
0
        private static List <ISpaceCraft> BuildFalconHeavy(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var demoSat = new DemoSat(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius) + config.PositionOffset,
                                      planet.Velocity + new DVector2(-400, 0) + config.VelocityOffset, config.PayloadMass);

            var fairingLeft  = new Fairing(craftDirectory, demoSat.Position, DVector2.Zero, true);
            var fairingRight = new Fairing(craftDirectory, demoSat.Position, DVector2.Zero, false);

            demoSat.AttachFairings(fairingLeft, fairingRight);

            var fhS1 = new FHS1(craftDirectory, DVector2.Zero, DVector2.Zero);
            var fhS2 = new FHS2(craftDirectory, DVector2.Zero, DVector2.Zero);

            var fhLeftBooster  = new FHBooster(craftDirectory, 1, DVector2.Zero, DVector2.Zero);
            var fhRightBooster = new FHBooster(craftDirectory, 2, DVector2.Zero, DVector2.Zero);

            demoSat.AddChild(fhS2);
            fhS2.SetParent(demoSat);
            fhS2.AddChild(fhS1);
            fhS1.SetParent(fhS2);
            fhS1.AddChild(fhLeftBooster);
            fhS1.AddChild(fhRightBooster);
            fhLeftBooster.SetParent(fhS1);
            fhRightBooster.SetParent(fhS1);

            return(new List <ISpaceCraft>
            {
                demoSat, fhS2, fhS1, fhLeftBooster, fhRightBooster
            });
        }
コード例 #9
0
        private static List <ISpaceCraft> BuildFalconHeavyDemo(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var roadster = new Roadster(craftDirectory, planet.Position + new DVector2(planet.SurfaceRadius, 0) + config.PositionOffset,
                                        planet.Velocity + new DVector2(0, -400) + config.VelocityOffset, config.PayloadMass);

            var fairingLeft  = new Fairing(craftDirectory, roadster.Position, DVector2.Zero, true, -5.0);
            var fairingRight = new Fairing(craftDirectory, roadster.Position, DVector2.Zero, false, -5.0);

            roadster.AttachFairings(fairingLeft, fairingRight);

            var fhS1 = new FHS1(craftDirectory, DVector2.Zero, DVector2.Zero, 404272);
            var fhS2 = new FHS2(craftDirectory, DVector2.Zero, DVector2.Zero, 8.4);

            var fhLeftBooster  = new FHBooster(craftDirectory, 1, DVector2.Zero, DVector2.Zero, 396772);
            var fhRightBooster = new FHBooster(craftDirectory, 2, DVector2.Zero, DVector2.Zero, 396772);

            roadster.AddChild(fhS2);
            fhS2.SetParent(roadster);
            fhS2.AddChild(fhS1);
            fhS1.SetParent(fhS2);
            fhS1.AddChild(fhLeftBooster);
            fhS1.AddChild(fhRightBooster);
            fhLeftBooster.SetParent(fhS1);
            fhRightBooster.SetParent(fhS1);

            return(new List <ISpaceCraft>
            {
                roadster, fhS2, fhLeftBooster, fhS1, fhRightBooster, fairingLeft, fairingRight
            });
        }
コード例 #10
0
        private static List <ISpaceCraft> BuildGreyDragonFH(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var dragon = new GreyDragon.GreyDragon(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius), planet.Velocity, config.PayloadMass, 446);

            var dragonTrunk = new DragonV2Trunk(craftDirectory, DVector2.Zero, DVector2.Zero);

            var fhS1 = new FHS1(craftDirectory, DVector2.Zero, DVector2.Zero);
            var fhS2 = new FHS2(craftDirectory, DVector2.Zero, DVector2.Zero);

            var fhLeftBooster  = new FHBooster(craftDirectory, 1, DVector2.Zero, DVector2.Zero);
            var fhRightBooster = new FHBooster(craftDirectory, 2, DVector2.Zero, DVector2.Zero);

            dragon.AddChild(dragonTrunk);
            dragonTrunk.SetParent(dragon);
            dragonTrunk.AddChild(fhS2);
            fhS2.SetParent(dragonTrunk);
            fhS2.AddChild(fhS1);
            fhS1.SetParent(fhS2);
            fhS1.AddChild(fhLeftBooster);
            fhS1.AddChild(fhRightBooster);
            fhLeftBooster.SetParent(fhS1);
            fhRightBooster.SetParent(fhS1);

            return(new List <ISpaceCraft>
            {
                dragon, dragonTrunk, fhS2, fhS1, fhLeftBooster, fhRightBooster
            });
        }
コード例 #11
0
 private void OnTaskFinished(int taskId, ArkCrossEngine.MissionOperationType opType, string schedule)
 {
     try
     {
         if (opType == ArkCrossEngine.MissionOperationType.FINISH)
         {
             MissionConfig missionconfig = ArkCrossEngine.LogicSystem.GetMissionDataById(taskId);
             if (missionconfig == null)
             {
                 return;
             }
             if (missionconfig.MissionType == 1)
             {
                 //主线任务完成
                 if (goAwardHint != null)
                 {
                     NGUITools.SetActive(goAwardHint, true);
                 }
                 m_IsCopy = false;
             }
         }
     }
     catch (Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
コード例 #12
0
    private void buildMission()
    {
        MissionConfig mission = MissionConfig.Instance;

        // Pick the correct X-ray machine
        string locationXrayMachineName = room.GetComponent <Room>().setLocation(mission.location);

        GameObject locationXrayMachine = null;

        foreach (GameObject xrayMachine in xrayMachines)
        {
            if (xrayMachine.name == locationXrayMachineName)
            {
                locationXrayMachine = xrayMachine;
                break;
            }
        }

        if (locationXrayMachine == null)
        {
            locationXrayMachine = xrayMachines[0];
        }

        GameObject xrayMachineGameObject = Instantiate(locationXrayMachine, locationXrayMachine.transform.position, Quaternion.identity);

        currentXrayMachine = xrayMachineGameObject.GetComponent <XRayMachine> ();
        currentXrayMachine.attachConnectingConveyors();

        // Pick the correct time piece
        GameObject locationClock = null;

        foreach (GameObject clock in clocks)
        {
            if (clock.name == mission.clockType)
            {
                locationClock = clock;
                break;
            }
        }

        if (locationClock == null)
        {
            locationClock = clocks[0];
        }

        GameObject clockObject = Instantiate(locationClock);

        currentClock = clockObject.GetComponent <Clock> ();
        currentClock.setTime(mission.startTime);
        currentClock.speed = mission.timeSpeed;
        currentClock.notifyOnTime(mission.endTime);
        PubSub.subscribe("MISSION_TIME_END", this);
        currentClock.setRandomPosition = false;
        currentClock.clockPosition     = mission.clockPosition;

        // Set the encounter and bag seeds
        ItsRandom.setRandomSeeds(mission.seedsConfig.bags, "bags");
        ItsRandom.setRandomSeeds(mission.seedsConfig.people, "people");
    }
コード例 #13
0
        private static List <ISpaceCraft> BuildBfsMarsReturnEdl(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var ship = new BFS300(craftDirectory, planet.Position + new DVector2(0, planet.SurfaceRadius + 166000.0),
                                  planet.Velocity + new DVector2(12500, -1640), config.PayloadMass, 30000);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #14
0
        private static List <ISpaceCraft> BuildBfs300(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            // inclination 53°
            var ship = new BFS300(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius), planet.Velocity + new DVector2(-277, 0), config.PayloadMass, 1100000);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #15
0
        private static List <ISpaceCraft> BuildMiniBfs(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            // inclination 28.5°
            var ship = new MiniBFS(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius), planet.Velocity + new DVector2(-400, 0), config.PayloadMass, 75000);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #16
0
        private static List <ISpaceCraft> BuildScaledBfsEDL(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var ship = new ScaledBFS(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius - 150000),
                                     planet.Velocity + new DVector2(-10800, 1161.2), config.PayloadMass, 20000);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #17
0
        private static List <ISpaceCraft> BuildITSTanker(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var tanker = new ITSTanker(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius),
                                       planet.Velocity + new DVector2(-400, 0), config.PayloadMass, 0);

            return(new List <ISpaceCraft>
            {
                tanker
            });
        }
コード例 #18
0
        private static List <ISpaceCraft> BuildScaledBfsTEI(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var ship = new ScaledBFS(craftDirectory, planet.Position + new DVector2(planet.SurfaceRadius, 0),
                                     planet.Velocity + new DVector2(0, 0), config.PayloadMass, 136600);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #19
0
        private static List <ISpaceCraft> BuildItsEDL(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var ship = new ITSShip(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius - 150000),
                                   planet.Velocity + new DVector2(-7400, 700), config.PayloadMass, 0);

            return(new List <ISpaceCraft>
            {
                ship
            });
        }
コード例 #20
0
        private static List <ISpaceCraft> BuildF9S2EDL(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var s2 = new F9S2B(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius - 150000),
                               planet.Velocity + new DVector2(-10000, 850), 0, 1000);

            return(new List <ISpaceCraft>
            {
                s2
            });
        }
コード例 #21
0
        public static List <ISpaceCraft> BuildAutoLandingTest(IMassiveBody planet, MissionConfig payload, string craftDirectory)
        {
            var f9 = new F9S1(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius - 7000),
                              planet.Velocity + new DVector2(-400, 400), 3500);

            return(new List <ISpaceCraft>
            {
                f9,
            });
        }
コード例 #22
0
        private static List <ISpaceCraft> BuildDragonV2Abort(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var dragon      = new DragonV2.DragonV2(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius), planet.Velocity, config.PayloadMass, 446);
            var dragonTrunk = new DragonV2Trunk(craftDirectory, DVector2.Zero, DVector2.Zero);

            dragon.AddChild(dragonTrunk);
            dragonTrunk.SetParent(dragon);

            return(new List <ISpaceCraft> {
                dragon, dragonTrunk
            });
        }
コード例 #23
0
    private Tuple2 <XmlDocument, Texture2D> getNextPersonConfig()
    {
        // TODO - Handle if "until time ends", i.e. no people remaining...
        MissionConfig mission = MissionConfig.Instance;
        List <PersonInMissionConfig> people      = mission.encountersConfig.people;
        PersonInMissionConfig        firstPerson = people.First();

        people.RemoveAt(0);
        return(new Tuple2 <XmlDocument, Texture2D>(firstPerson.personConfig, firstPerson.personTexture));
        // // TODO - pop lists
        // int randomPersonIndex = ItsRandom.randomRange(0, peopleConfigs.Count);
        // return new Tuple2<XmlDocument, Texture2D>(peopleConfigs[randomPersonIndex], passportTextures[randomPersonIndex]);
    }
コード例 #24
0
        public ActionResult Index()
        {
            var viewModel = new SearchAdminViewModel();

            var configData = MissionConfig.GetConfigData();

            if (configData.LastContentCrawledDate != null)
            {
                viewModel.LastContentCrawlDate = configData.LastContentCrawledDate.Value.ToString("MM-dd-yyyy hh:mm:ss");
            }

            if (configData.LastAssetCrawledDate != null)
            {
                viewModel.LastAssetCrawlDate = configData.LastAssetCrawledDate.Value.ToString("MM-dd-yyyy hh:mm:ss");
            }

            viewModel.IndexOnPublishContent = configData.IndexOnPublishContent;
            viewModel.IndexOnPublishAsset   = configData.IndexOnPublishAsset;
            viewModel.CrawlerPageExclusions = configData.CrawlerPageExclusions;

            viewModel.Status = "Online";

            try
            {
                var srchClient = SearchFactory <SearchDocument> .SearchClient;
                viewModel.SearchServer = srchClient.SrchConnStr;
                viewModel.SearchClient = srchClient.GetType().Name;

                var req = new SearchRequest()
                {
                    QueryText = "*:*"
                };

                req.Facets.Add(new FieldFacet("mimetype", ""));

                var result = srchClient.Search(req);

                viewModel.IndexTotalItems = result.TotalFound;

                if (result.Refinements.Any())
                {
                    viewModel.IndexCounts = result.Refinements[0].Items.ToDictionary(t => t.DisplayName, t => t.Count);
                }
            }
            catch
            {
                viewModel.Status = "Offline";
            }

            return(View("~/modules/MissionSearchEpi/UI/Views/SearchAdmin/index.cshtml", viewModel));
        }
コード例 #25
0
    public void OnMissionCompelete(int[] whichMission)
    {
        //complete this mission only if it's a current mission and wasn't finished yet

        for (int i = 0; i < whichMission.Length; i++)
        {
            Debug.Log("awarding reward for mission: " + whichMission[i].ToString());
            if (whichMission[i] == CurrentMission)
            {
                MissionConfig currentMission = GetCurrentMissionConfig();

                //show reward
                _RewardPopupController.Show(currentMission.Reward.ToString());
                AwardXP(currentMission.Reward);


                _FinishedMissions.Add(CurrentMission);
                this.CurrentMission += 1;
                HideMissionPopup();

                if (this.CurrentMission >= this.Missions.Length)
                {
                    Debug.Log("breaking onMissionComplete()-no more missions.");
                    return;
                }

                //get new current mission and see if should be skipped
                bool foundActiveMission = false;
                while (!foundActiveMission)
                {
                    currentMission = GetCurrentMissionConfig();
                    if (!currentMission.IsActive)
                    {
                        //skip
                        this.CurrentMission += 1;//go to the next one
                    }
                    else
                    {
                        foundActiveMission = true;
                    }
                }
                Debug.Log("Active mission:" + currentMission.ID.ToString());

                if (currentMission.ID == 14)
                {
                    ActivateBrowserButton();
                }
            }
        }
    }
コード例 #26
0
    public static IEnumerator LoadConfig(XmlNode seedsXml, MissionConfig missionConfig)
    {
        XmlNode    peopleNode = seedsXml.SelectSingleNode("people");
        List <int> people     = Misc.splitInts(peopleNode.InnerText);

        XmlNode    bagsNode = seedsXml.SelectSingleNode("bags");
        List <int> bags     = Misc.splitInts(bagsNode.InnerText);

        SeedsConfig seedsConfig = new SeedsConfig(people, bags);

        missionConfig.seedsConfig = seedsConfig;

        yield return(null);
    }
コード例 #27
0
        private static List <ISpaceCraft> BuildF9S2TJI(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var demoSat = new DemoSat(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius - 169500),
                                      planet.Velocity + new DVector2(-7795, 0), config.PayloadMass);
            var f9S2 = new F9S2(craftDirectory, DVector2.Zero, DVector2.Zero, 8.3);

            demoSat.AddChild(f9S2);
            f9S2.SetParent(demoSat);

            return(new List <ISpaceCraft>
            {
                demoSat, f9S2
            });
        }
コード例 #28
0
        private static List <ISpaceCraft> BuildScaledBFR(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var ship = new ScaledBFS(craftDirectory, planet.Position + new DVector2(0, -planet.SurfaceRadius),
                                     planet.Velocity + new DVector2(-400, 0), config.PayloadMass, 670000);

            var booster = new ScaledBFR(craftDirectory, DVector2.Zero, DVector2.Zero);

            ship.AddChild(booster);
            booster.SetParent(ship);

            return(new List <ISpaceCraft>
            {
                ship, booster
            });
        }
コード例 #29
0
        public ActionResult SaveSettings()
        {
            var indexContent = Request["IndexOnPublishContent"];
            var indexAsset   = Request["IndexOnPublishAsset"];

            var configData = MissionConfig.GetConfigData();

            configData.IndexOnPublishContent = (indexContent.Contains("true"));
            configData.IndexOnPublishAsset   = (indexAsset.Contains("true"));
            configData.CrawlerPageExclusions = Request["CrawlerPageExclusions"];

            MissionConfig.SaveConfigData(configData);

            return(RedirectToAction("Index"));
        }
コード例 #30
0
        private static List <ISpaceCraft> BuildDragonV2Entry(IMassiveBody planet, MissionConfig config, string craftDirectory)
        {
            var dragon = new GreyDragon.GreyDragon(craftDirectory, planet.Position + new DVector2(0, planet.SurfaceRadius + 200000.0),
                                                   planet.Velocity + new DVector2(11000, -1650), config.PayloadMass, 446);

            var dragonTrunk = new DragonV2Trunk(craftDirectory, DVector2.Zero, DVector2.Zero);

            dragon.AddChild(dragonTrunk);
            dragonTrunk.SetParent(dragon);

            dragon.SetPitch(Math.PI * 1.24);

            return(new List <ISpaceCraft> {
                dragon, dragonTrunk
            });
        }