public Mission(MissionType type, Factory factory) { this.type = type; this.factory = factory; this.acceptedMission = new SortedSet <Troop>(); this.prereqs = new HashSet <Mission>(); this.planner = new MissionPlanner(this); switch (type) { case MissionType.Capture: solver = new CaptureMissionSolver(this); break; case MissionType.Defend: solver = new CaptureMissionSolver(this); break; case MissionType.IncSupport: solver = new ReinforceMissionSolver(this); break; case MissionType.Reinforce: solver = new ReinforceMissionSolver(this); break; case MissionType.Inc: solver = new IncreaseMissionSolver(this); break; default: break; } }
public async Task <ActionResult <MissionType> > PostMissionType(MissionType missionType) { _context.MissionTypes.Add(missionType); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMissionType", new { id = missionType.MissionTypeId }, missionType)); }
public MissionData(MissionType type, int targetValue, int rewordValue, int skipCost) { this.type = type; this.targetValue = targetValue; this.skipCost = skipCost; currentValue = 0; }
public static void SelectMission(MissionType type, MissionRewardType[] rewards) { UserInterface.BlurSet(false); UserInterface.SetMissionSelectionUI(false); UserInterface.SetPointerMode(false); GameManager.Instance.IsPuase = false; //UserInterface.FullModeSetMP(); if (type == MissionType.Boss) { MCSceneManager.Instance.NextScene(MCSceneManager.BOSS, 1f, true); } else { switch (type) { case MissionType.Annihilation: MCSceneManager.Instance.NextScene(MCSceneManager.ANNIHILATION, 1f, true); break; case MissionType.Defence: MCSceneManager.Instance.NextScene(MCSceneManager.DEFENCE, 1f, true); break; case MissionType.Survival: MCSceneManager.Instance.NextScene(MCSceneManager.SURVIVAL, 1f, true); break; } Instance.currentMissionRewards = rewards; } }
public static string Add(string name) { using (ArmyBaseContext db = new ArmyBaseContext()) { string error = null; MissionType newMissionType = new MissionType(); newMissionType.Name = name; var context = new ValidationContext(newMissionType, null, null); var result = new List <ValidationResult>(); Validator.TryValidateObject(newMissionType, context, result, true); foreach (var x in result) { error = error + x.ErrorMessage + "\n"; } if (error == null) { db.MissionTypes.Add(newMissionType); db.SaveChanges(); } return(error); } }
public async Task <IActionResult> PutMissionType(int id, MissionType missionType) { if (id != missionType.MissionTypeId) { return(BadRequest()); } _context.Entry(missionType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MissionTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void StartMission(MissionType mt, bool toRepeat) { PanelLoadingMission.SetActive(true); PanelLoadingMission.GetComponent <PanelLoadingMission>().LoadMission(mt, toRepeat); Game.Me.PanelAfterMission.SetActive(false); gameObject.SetActive(false); }
public static Mission CreateMission(MissionType type, World world) { switch (type) { case MissionType.Junkyard: Pose start = new Pose(10f, 10f, 0f); Pose goal = new Pose(140f, 140f, MathHelper.PiOver2); return(new Mission { Start = start, Goal = goal, Environment = new RandomEnvironment(world, 200, start.Position, goal.Position), AStarEpsilon = 1.1f }); case MissionType.ParkingLot: return(new Mission { //Start = new Pose(20f, 10f, 0f), //Goal = new Pose(90f, 83.6f, MathHelper.PiOver2), Start = new Pose(140f, 45f, -MathHelper.Pi), Goal = new Pose(90f, 86.34f, -MathHelper.PiOver2), Environment = new ParkingEnvironment(world), AStarEpsilon = 2f }); } return(new Mission()); }
public void ResetMissionDetails() { currentMission = MissionType.None; missionText.text = "Current Mission: None"; missionItem = null; haveItem = false; }
public void SelectSupportDeck(List <Mem_deck> targetDeck, bool isForwardDeck) { MissionType searchKey2; if (Mst_DataManager.Instance.Mst_mapenemy.get_Item(this._e_Data.Enemy_id).Boss != 0) { searchKey2 = MissionType.SupportBoss; } else { searchKey2 = MissionType.SupportForward; } this.supportType = searchKey2; if (targetDeck == null || targetDeck.get_Count() == 0) { return; } IOrderedEnumerable <Mem_deck> orderedEnumerable = Enumerable.OrderByDescending <Mem_deck, int>(targetDeck, (Mem_deck x) => x.Mission_id); MissionType searchKey = searchKey2; this.supportDeck = Enumerable.FirstOrDefault <Mem_deck>(Enumerable.Select(Enumerable.Where(Enumerable.Select(orderedEnumerable, (Mem_deck deck) => new { deck = deck, mst_misson = Mst_DataManager.Instance.Mst_mission.get_Item(deck.Mission_id) }), <> __TranspIdent14 => < > __TranspIdent14.mst_misson.Mission_type == searchKey), <> __TranspIdent14 => < > __TranspIdent14.deck)); }
public Mission(int id, MissionType type, int contextId, int actionId, int noteId, int stereotypeId, string name, string text, DateTime created, DateTime lastChanged, DateTime start, DateTime end, bool autoTiming = false) : base(actionId, noteId, stereotypeId, name, text, created, lastChanged, start, end, autoTiming) { Id = id; Type = type; ContextId = contextId; }
public Mission(string name, MissionType mType, Blueprint requiredBP, string desc = "Unknown Signal") { missionName = name; missionType = mType; requiredBlueprint = requiredBP; description = desc; }
static void ProcessGameDataFromString(string mapText) { //Structure of text file like this: //1st: Line start with "GM". This is game mode line (0-Move Limit, 1-Time Limit) //2nd: Line start with "LMT" is limit amount of play time (time of move or seconds depend on game mode) //Ex: LMT 20 mean player can move 20 times or 20 seconds, depend on game mode //3rd: Line start with "MNS" is missions line. This is amount ofScore/Block/Ring/... //Ex: MNS 10000/24/0' mean user need get 1000 points, 24 block, and not need to get rings. //4th:Map lines: This is an array of square types. //First thing is split text to get all in arrays of text string[] lines = mapText.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries); int mapLine = 0; foreach (string line in lines) { //check if line is game mode line if (line.StartsWith("GM")) { //Replace GM to get mode number, string modeString = line.Replace("GM", string.Empty).Trim(); //then parse it to interger int modeNum = int.Parse(modeString); //Assign game mode mode = (GameMode)modeNum; } else if (line.StartsWith("LMT")) { //Replace LTM to get limit number, string amountString = line.Replace("LMT", string.Empty).Trim(); //then parse it to interger and assign to limitAmount limitAmount = int.Parse(amountString); } //check third line to get missions else if (line.StartsWith("MNS")) { //Replace 'MNS' to get mission numbers string missionString = line.Replace("MNS", string.Empty).Trim(); //Split again to get mission numbers string[] missionNumbers = missionString.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < missionNumbers.Length; i++) { //Set scores of mission and mission type int amount = int.Parse(missionNumbers[i].Trim()); MissionType type = (MissionType)i; requestMissions.Add(new Mission(amount, type)); } } else //Maps { //Split lines again to get map numbers string[] squareTypes = line.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < squareTypes.Length; i++) { map[mapLine * Map.maxCol + i] = int.Parse(squareTypes[i].Trim()); } mapLine++; } } }
public MissionVO(int id, string name, MissionType missionType, int numberOfWaves) { this.id = id; this.name = name; this.missionType = missionType; this.numberOfWaves = numberOfWaves; }
public override int GetHashCode() { int hash = 1; if (UserId != 0) { hash ^= UserId.GetHashCode(); } if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (MissionType != 0) { hash ^= MissionType.GetHashCode(); } if (Status != 0) { hash ^= Status.GetHashCode(); } if (Progress != 0L) { hash ^= Progress.GetHashCode(); } if (Finish != 0L) { hash ^= Finish.GetHashCode(); } return(hash); }
public Mission(MissionType type, Factory factory, int troopsNeeded) { this.type = type; this.factory = factory; this.troopsNeeded = troopsNeeded; this.acceptedMission = new Dictionary <Factory, int>(); }
public Mission(MissionType type, bool succeeded, float time, int hits) { this.type = type; this.succeeded = succeeded; this.time = time; this.hits = hits; }
public IHttpActionResult PutMissionType(int id, MissionType missionType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != missionType.id) { return(BadRequest()); } db.Entry(missionType).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!MissionTypeExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
private void SetSimpleGoal(MissionType type) { var text = ""; float goalValue = 0; switch (type) { case MissionType.Annihilation: var missionA = missionMgr.CurrentMission as MissionA; goalValue = Mathf.Clamp01((float)GameStatus.Instance.ActivedMonsterList.Count / (float)missionA.waves[missionA.currentWave - 1].monsterTypes.Length); text = gameStatus.ActivedMonsterList.Count + " / " + missionA.waves[missionA.currentWave - 1].monsterTypes.Length; break; case MissionType.Survival: MissionB missionB = MissionManager.Instance.CurrentMission as MissionB; goalValue = Mathf.Clamp01((float)missionB.currentScore / (float)missionB.goalScore); text = missionB.currentScore + " / 5"; break; case MissionType.Defence: MissionC missionC = MissionManager.Instance.CurrentMission as MissionC; goalValue = Mathf.Clamp01((float)missionC.protectedTarget.hp / (float)missionC._ProtectedTargetHP); text = missionC.protectedTarget.hp + " / " + missionC._ProtectedTargetHP; break; case MissionType.Boss: text = "리리스를 처치하시오"; break; } CurrentGoal.text = text; CurrentGoalBack.fillAmount = goalValue; }
public static string GetMissionButtonDisplayText(MissionType type) { switch (type) { case MissionType.Attack: case MissionType.Pvp: return(Service.Get <Lang>().Get("BUTTON_MISSION_ATTACK", new object[0])); case MissionType.Defend: case MissionType.RaidDefend: return(Service.Get <Lang>().Get("BUTTON_MISSION_DEFEND", new object[0])); case MissionType.Collect: return(Service.Get <Lang>().Get("BUTTON_MISSION_COLLECT", new object[0])); case MissionType.Own: return(Service.Get <Lang>().Get("BUTTON_MISSION_OWN", new object[0])); case MissionType.Event: return(Service.Get <Lang>().Get("BUTTON_MISSION_EVENT", new object[0])); default: return(Service.Get <Lang>().Get("BUTTON_MISSION_ATTACK", new object[0])); } }
private void StartButton_Click(object sender, RoutedEventArgs e) { MissionType type = new MissionType(); Mission mission = new Mission(); Resource res = new Resource(); float progress = 0; missionRepo.GetAllMissions().ForEach(m => { if (missionsListBox.SelectedItem != null) { if (m.MissionName == missionsListBox.SelectedItem.ToString()) { type = m.MissionType; mission = m; } } }); pausedRepo.GetAllMissions().ForEach(pM => { if (mission.Id == pM.MissionId) { progress = pM.Progress; pausedRepo.DeleteMission(pM.Id); } }); if (resourcesListBox.SelectedItem != null) { string str = resourcesListBox.SelectedValue.ToString(); resourceRepo.GetAllResources().ForEach(r => { if (r.ResourceName == str) { res = r; } }); } ViewModel?.StopMission(); ViewModel = new DefaultViewModel(); /*------Добавление нового типа------*/ if (type.GetType() == typeof(ExcavationType)) { DataContext = ViewModel = new ExcavationVIewModel(progress, mission, res); } else if (type.GetType() == typeof(SurvivalType)) { DataContext = ViewModel = new SurvivalViewModel(progress, mission, res); } else { DataContext = ViewModel = new DefaultViewModel(); } /*----------------------------------*/ ViewModel.onMissionStop += onMissionStopHandler; ViewModel.StartMission(); }
void SetMissionType() { // Whoa, here we get the amount of types in the enum and set the static missionType by random int amountOptions = System.Enum.GetNames(typeof(MissionType)).Length; missionType = (MissionType)UnityEngine.Random.Range(0, amountOptions); Debug.Log("Mission type: " + missionType); }
public Mission(string name, int number, string textname, MissionType type) { Name = name; Number = number; Textname = textname; Iscompleted = false; Type = type; }
internal static WWW LoadMission(MissionType mt, bool toRepeat) { WWWForm form = new WWWForm(); form.AddField("MissionType", mt.ToString()); form.AddField("ToRepeat", toRepeat ? 1 : 0); return(CreateWWW("/load", form)); }
public Mission(MissionType type, Factory factory, int troopsNeeded) { this.type = type; this.factory = factory; this.troopsNeeded = troopsNeeded; this.acceptedMission = new Dictionary <Factory, Troop>(); this.largestDistance = 1; }
public void CreateType(MissionType type) { using (var ctx = new WarframeResDemoContext()) { ctx.MissionTypes.Add(type); ctx.SaveChanges(); } }
public ActionResult DeleteConfirmed(int id) { MissionType missionType = db.MissionTypes.Find(id); db.MissionTypes.Remove(missionType); db.SaveChanges(); return(RedirectToAction("Index")); }
public Alien(Word[] _name, float _sympathy, Dictionary <Word, GlossaryValues> _glossary, MissionType _mission, Vector2Int _coord, Races _race) { name = _name; sympathy = _sympathy; glossary = _glossary; mission = _mission; coordinates = _coord; race = _race; }
public Mission(string description, MissionType type, double requirements, List <IItem> rewards) { Description = description; Type = type; Requirements = requirements; Rewards = new List <IItem>(rewards); Progress = 0; _missionCanvas = GameObject.Find("MissionsCanvas"); }
public Mission(MissionType type, Factory factory, int troopsNeeded) { this.type = type; this.factory = factory; this.troopsNeeded = troopsNeeded; this.acceptedMission = new HashSet <Troop>(); this.maxTroopCount = 0; }
// Survival Mission: public Mission(string name, MissionType mType, Blueprint requiredBP, TileData.Types reqResource, int reqAmnt, string desc = "Unknown Signal") { missionName = name; missionType = mType; requiredBlueprint = requiredBP; description = desc; objectiveResource = reqResource; objectiveAmnt = reqAmnt; }
private void OnMissionSelectionChanged(MissionType mt) { Type type; if (typeToOptionDic.TryGetValue(mt, out type)) { createMissionArea.ShowMissionOption(type); } }
//Insert score by mission type //Ex: if user get one Ring, we will add 1 with type is MissionType.Ring public void AddScore(int amount, MissionType missionType) { Mission score = missionScores.Find(obj => obj.type == missionType); if (score != null) { score.amount += amount; } }
void OnTriggerEnter(Collider c) { if (c.gameObject.name == "GalaxyPoint") { print("GalaxyPoint Mission: " + c.GetComponent<GalaxyPoint>().mType.ToString()); mType = (MissionType)c.GetComponent<GalaxyPoint>().mType; onGalaxyPoint = true; } }
public MissionScript(string MissionName, int MissionDifficulty, MissionType TypeOfMission, float MissionTimeRequired) { name = MissionName; difficulty = MissionDifficulty; missionType = TypeOfMission; TimeReq = MissionTimeRequired; TimeRemaining = TimeReq; expReward = difficulty * Random.Range(9,24); moneyReward = (difficulty * Random.Range(99, 249)) + Random.Range(0, 99); missionState = MissionState.inactive; }
//protected Player // Use this for initialization public void Awake() { gsh = GameObject.Find ("GameStateHandler").GetComponent<GameStateHandler>(); missionType = gsh.currentMissionType; //target = GameObject.FindGameObjectWithTag("MissionTarget").transform; //playerAttributes = GameObject.FindWithTag("Player").transform.GetComponent<PlayerAttributes>(); playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>(); playerScript.activeMissions.Add(this); playerScript.currentMission = this; missionTextString = GameObject.FindGameObjectWithTag("MissionInfo").GetComponent<Text>() as Text; }
// Use this for initialization void Start() { int rand = Random.Range(1,100); if (rand <= 25){ missionType = MissionType.Elimination; } else if (rand > 25 && rand <= 50){ missionType = MissionType.Intel; } else { missionType = MissionType.None; } }
public Mission(int i, MissionType previousType) { missionTitle = "Mission " + i; if (i == 1 || i == 6) type = getMissionType(i); else type = getMissionType(i, previousType); difficulty = getDifficulty(i); setWaves(); bonusObjective = getBonusObjective();//picks bonus setBonusObjective();//configures bonuses generateMapConfiguration(); generateEnemies(); }
public Mission GetMission(MissionType mType) { if (mType == MissionType.SCIENCE) { return scienceMissions[Random.Range(0, scienceMissions.Count)]; } else if (mType == MissionType.SURVIVAL) { return survivalMissions[Random.Range(0, survivalMissions.Count)]; } else { return encounterMissions[Random.Range(0, encounterMissions.Count)]; } }
public MissionController(MissionType missionID) { if (missionID == MissionType.Assault) { enemiesList = new List<BaseEnemyAI>(); GameObject[] enemiesGos = GameObject.FindGameObjectsWithTag("Enemy"); foreach(GameObject go in enemiesGos){ BaseEnemyAI enemy = go.GetComponent<BaseEnemyAI>(); if(enemy != null) enemiesList.Add(enemy); } } missionType = missionID; }
/// <summary>Initializes a new instance of the SIN Mission.</summary> /// <param name="id">The id.</param> /// <param name="shipId">The ship id.</param> /// <param name="startDate">The start date.</param> /// <param name="description">The description.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="missionTypeEnum">The mission type enum.</param> /// <param name="policeNeeded">The police needed.</param> public MissionModel(int id, int shipId, DateTime startDate, string description, int x, int y, MissionType missionTypeEnum, int policeNeeded) { if (id != 0) { this.Id = id; } this.ShipId = shipId; this.StartDate = startDate; this.Description = description; this.X = x; this.Y = y; this.MissionTypeEnum = missionTypeEnum; if (missionTypeEnum == MissionType.Sin) { this.PoliceNeeded = policeNeeded; } }
public void MissionComplete(MissionType missionType) { // award an achievement if the player finishes all of the missions of a certain type // the mission is finished if it is evenly divisible by 3 if ((int)missionType % 3 == 0) { switch (missionType) { case MissionType.ExpertRunner: RecordAchievement(SocialAchievementID.ExpertRunner, 100.0f); break; case MissionType.ExpertCoinCollector: RecordAchievement(SocialAchievementID.ExpertCoinCollector, 100.0f); break; case MissionType.ExpertPlayCount: RecordAchievement(SocialAchievementID.ExpertPlayer, 100.0f); break; } } }
/// <summary>Initializes a new instance of the HOPE Mission.</summary> /// <param name="id">The id.</param> /// <param name="shipId">The ship id.</param> /// <param name="description">The description.</param> /// <param name="startDate">The start date.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="missionTypeEnum">The mission type enum.</param> /// <param name="endDate">The end date.</param> public MissionModel(int id, int shipId, string description, DateTime startDate, int x, int y, MissionType missionTypeEnum, DateTime endDate) { if (id != 0) { this.Id = id; } this.ShipId = shipId; this.Description = description; this.StartDate = startDate; this.X = x; this.Y = y; this.MissionTypeEnum = missionTypeEnum; if (missionTypeEnum == MissionType.Hope) { this.Approved = false; this.EndDate = endDate; } }
public void setMissionType(MissionType missionType, String missionKey) { m_tabMission.setMissionType(missionType, missionKey); onChanged(); }
public void SetEnterTimes(MissionType missionType, int times, int level, bool isFoggyAbyssSuccess = false) { switch (missionType) { case MissionType.Normal: { SetEnterNormalTimes(times, level); } break; case MissionType.FoggyAbyss: { SetEnterFoggyAbyssTimes(isFoggyAbyssSuccess); } break; } }
// Science Mission: public Mission(string name, MissionType mType, Blueprint requiredBP, int stages, string desc = "Unknown Signal") { missionName = name; missionType = mType; requiredBlueprint = requiredBP; description = desc; objectiveStages = stages; }
public string getMissionDescription(MissionType missionType) { return staticData.getMissionDescription(missionType); }
public int getMissionGoal(MissionType missionType) { return staticData.getMissionGoal(missionType); }
public Mission(MissionType initType, string initMissionText) { Type = initType; Text = initMissionText; }
public static Mission CreateMission(MissionType type, World world) { switch (type) { case MissionType.Junkyard: Pose start = new Pose(10f, 10f, 0f); Pose goal = new Pose(140f, 140f, MathHelper.PiOver2); return new Mission { Start = start, Goal = goal, Environment = new RandomEnvironment(world, 200, start.Position, goal.Position), AStarEpsilon = 1.1f }; case MissionType.ParkingLot: return new Mission { //Start = new Pose(20f, 10f, 0f), //Goal = new Pose(90f, 83.6f, MathHelper.PiOver2), Start = new Pose(140f, 45f, -MathHelper.Pi), Goal = new Pose(90f, 86.34f, -MathHelper.PiOver2), Environment = new ParkingEnvironment(world), AStarEpsilon = 2f }; } return new Mission(); }
/// <summary> /// 切换关卡类型 /// </summary> /// <param name="mode"></param> public void ChangeMode(MissionType mode) { CurrentMode = mode; switch (mode) { case MissionType.Normal: ChangeModeToNormal(); break; case MissionType.FoggyAbyss: ChangeModeToFoggyAbyss(); break; } }
public void setType(MissionType type) { m_missionType = type; }
public int GetMissionGoal(MissionType missionType) { return missionGoal[(int)missionType]; }
public Mission(Thief theThief, MissionType mType, List<Point> pts) { thief = theThief; type=mType; targets = pts; }
/// <summary> /// Adds a mission. /// </summary> /// <param name="action">Action to be performed to complete the mission</param> /// <param name="quantity">Amount of targets the action must be applied to.</param> /// <param name="what">Target of the mission.</param> /// <param name="type">Type of target.</param> /// <param name="priority">Priority of the mission.</param> /// <param name="isMain">If set to <c>false</c> it is a secondary mission.</param> /// <param name="information">Additional information for this mission (such as a description).</param> public void AddMission(MissionType action, uint quantity, Storage.EntityType what, MissionDefinition.TargetType type, uint priority, bool isMain, string information) { MissionDefinition definition = new MissionDefinition(); definition.amount = quantity; definition.information = information; definition.main = isMain; definition.priority = priority; definition.purpose = action; definition.target = what; definition.targetType = type; missions.Add(definition); }
private void MissionComplete(MissionType missionType) { if (((int)missionType - 3) % 4 != 0) { // don't increment if the player has already reached the max int missionSet = (int)missionType / 4; activeMissions[missionSet] = missionType + 1; scoreMultiplier += scoreMultiplierIncrement; PlayerPrefs.SetInt(string.Format("Mission{0}", missionSet), (int)activeMissions[missionSet]); } if (OnMissionComplete != null) { OnMissionComplete(missionType); } }
public string GetMissionDescription(MissionType missionType) { return missionDescription[(int)missionType]; }
private MissionType getMissionType(int i, MissionType t) { if (i % 5 == 0) { missionType = "Special Target Elimination"; shortObjective = "Destroy The Boss"; missionObjective = "Destroy the enemy capital ship before it can flee the sector and warn the nearby enemy fleet."; return MissionType.Boss; } float f = Random.RandomRange(0f, 1.00f); switch (t) { case MissionType.Elimination: if (f < .33f) { missionType = "Assault The Base"; shortObjective = "Destroy The Space Station"; missionObjective = "Eliminate the enemy space station to destroy their presence in this system."; return MissionType.BaseAssault; } if (f >= .33f && f < .66f) { missionType = "Defend Ally"; shortObjective = "Protect The Ship"; missionObjective = "Defend the ship as it surveys a critical planet."; return MissionType.DefendShip; } if (f >= .66f) { missionType = "Defend World"; shortObjective = "Protect The Planet"; missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated."; return MissionType.DefendArea; } break; case MissionType.BaseAssault: if (f < .33f) { missionType = "Liberate The Sector"; shortObjective = "Destroy All Enemies"; missionObjective = "Wipe out all enemies within the star system."; return MissionType.Elimination; } if (f >= .33f && f < .66f) { missionType = "Defend Ally"; shortObjective = "Protect The Ship"; missionObjective = "Defend the ship as it surveys a critical planet."; return MissionType.DefendShip; } if (f >= .66f) { missionType = "Defend World"; shortObjective = "Protect The Planet"; missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated."; return MissionType.DefendArea; } break; case MissionType.DefendArea: if (f < .33f) { missionType = "Liberate The Sector"; shortObjective = "Destroy All Enemies"; missionObjective = "Wipe out all enemies within the star system."; return MissionType.Elimination; } if (f >= .33f && f < .66f) { missionType = "Defend Ally"; shortObjective = "Protect The Ship"; missionObjective = "Defend the ship as it surveys a critical planet."; return MissionType.DefendShip; } if (f >= .66f) { missionType = "Assault The Base"; shortObjective = "Destroy The Space Station"; missionObjective = "Eliminate the enemy space station to destroy their presence in this system."; return MissionType.BaseAssault; } break; case MissionType.DefendShip: if (f < .33f) { missionType = "Liberate The Sector"; shortObjective = "Destroy All Enemies"; missionObjective = "Wipe out all enemies within the star system."; return MissionType.Elimination; } if (f >= .33f && f < .66f) { missionType = "Defend World"; shortObjective = "Protect The Planet"; missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated."; return MissionType.DefendArea; } if (f >= .66f) { missionType = "Assault The Base"; shortObjective = "Destroy The Space Station"; missionObjective = "Eliminate the enemy space station to destroy their presence in this system."; return MissionType.BaseAssault; } break; } return MissionType.Elimination; }
public string GetMissionCompleteText(MissionType missionType) { return missionCompleteText[(int)missionType]; }
public string GetMissionCompleteText(MissionType missionType) { return staticData.GetMissionCompleteText(missionType); }