public override Boolean Activate()
        {
            var     eventTextList         = new List <String>();
            Boolean successfullyActivated = false;

            if (!IsCleared())
            {
                var item = GetProgressBasedRandomItem(Game);
                if (getItemOE == null)
                {
                    getItemOE = new GetItemOE(item, string.Format("You found the {0}!", item.Name), "Your inventory is full!", "Cleared (is this shown?)");
                }
                successfullyActivated = getItemOE.Activate();

                if (successfullyActivated)
                {
                    ClearEvent();
                }
            }
            else
            {
                eventTextList.Add(clearText);
                PopupHandler.DisplayMessage(eventTextList.ToArray());
            }

            return(successfullyActivated);
        }
 private void DisplayTutorialMessage(String message)
 {
     if (tutorialsUsed)
     {
         PopupHandler.DisplayMessage(message);
     }
 }
 private void DisplayTutorialMessage(List <String> messages)
 {
     if (tutorialsUsed)
     {
         PopupHandler.DisplayMessage(messages.ToArray());
     }
 }
Beispiel #4
0
        public override void OnFailed()
        {
            base.OnFailed();

            RemoveShips();
            PopupHandler.DisplayMessage("You were unsuccessful in retrieving Ente. Return to the rebel base to try again.");
        }
        private void InputhandlingDebug()
        {
            //Changes states to play-state and playerstats-state
            if (ControlManager.CheckKeyPress(Keys.P))
            {
                Game.stateManager.shooterState.BeginLevel("Level1");
            }
            if (ControlManager.CheckKeyPress(Keys.E))
            {
                Game.stateManager.shooterState.BeginLevel("ExperimentLevel");
            }

            if (ControlManager.CheckKeyPress(Keys.U))
            {
                Game.stateManager.shooterState.BeginLevel("EscortLevel");
            }

            if (ControlManager.CheckKeyPress(Keys.Y))
            {
                PopupHandler.DisplayMessage("Player position: " + Game.player.position.ToString());
            }

            if (ControlManager.CheckKeyPress(Keys.F12))
            {
                ActivateBurnOutEnding();
            }
        }
Beispiel #6
0
        public override Boolean Activate()
        {
            var     eventTextList         = new List <String>();
            Boolean successfullyActivated = false;

            if (!IsCleared())
            {
                String      interactText   = "[SAIR] An ambush!";
                int         moneyReward    = 0;
                List <Item> itemRewards    = new List <Item>();
                String      levelCompleted = "You successfully fended of the ambush.";
                String      levelFailed    = "They got the better of you. Next time...";

                String levelString = GetProgressBasedLevel();

                levelEvent            = new LevelOE(interactText, levelString, moneyReward, itemRewards, levelCompleted, levelFailed);
                successfullyActivated = levelEvent.Activate();

                if (successfullyActivated)
                {
                    ClearEvent();
                }
            }
            else
            {
                eventTextList.Add(clearText);
                PopupHandler.DisplayMessage(eventTextList.ToArray());
            }

            return(successfullyActivated);
        }
        public override Boolean Activate()
        {
            Boolean successfullyActivated = false;

            var eventTextList = new List <String>();

            if (!IsCleared())
            {
                eventTextList.Add(eventText);

                if (ShipInventoryManager.HasAvailableSlot())
                {
                    ShipInventoryManager.AddItem(item);
                    ClearEvent();
                    successfullyActivated = true;
                }
                else
                {
                    eventTextList.Add(inventoryFullText);
                }
            }
            else
            {
                eventTextList.Add(clearText);
            }

            PopupHandler.DisplayMessage(eventTextList.ToArray());
            return(successfullyActivated);
        }
Beispiel #8
0
        public override void Update(Game1 game, GameTime gameTime)
        {
            if (!levelCleared && level != null && level != "")
            {
                if (game.stateManager.shooterState.CurrentLevel != null &&
                    game.stateManager.shooterState.CurrentLevel.Identifier.ToLower().Equals(level.ToLower()) &&
                    game.stateManager.shooterState.CurrentLevel.IsObjectiveFailed &&
                    GameStateManager.currentState.ToLower().Equals("overworldstate"))
                {
                    PopupHandler.DisplayMessage(levelFailedText);
                    game.stateManager.shooterState.GetLevel(level).Initialize();
                }

                else if (game.stateManager.shooterState.CurrentLevel != null &&
                         game.stateManager.shooterState.CurrentLevel.Identifier.ToLower().Equals(level.ToLower()) &&
                         game.stateManager.shooterState.CurrentLevel.IsObjectiveCompleted &&
                         GameStateManager.currentState.ToLower().Equals("overworldstate"))
                {
                    levelCleared = true;
                    PopupHandler.DisplayMessage(levelCompletedTextStrings.ToArray());
                    foreach (Item item in itemRewards)
                    {
                        ShipInventoryManager.AddItem(item);
                    }
                    StatsManager.Crebits += moneyReward;
                    ClearEvent();
                }
            }

            if (startLevelWhenTextCleared && PopupHandler.TextBufferEmpty)
            {
                game.stateManager.shooterState.BeginLevel(level);
                startLevelWhenTextCleared = false;
            }
        }
        public virtual void OnFailed()
        {
            if (failLogic == null)
            {
                if (objectiveFailedEventText != null && objectiveFailedEventText.Text != "")
                {
                    if (eventTextCanvas.Equals(EventTextCanvas.BaseState))
                    {
                        mission.MissionHelper.ShowEvent(objectiveFailedEventText);
                    }
                    else if (eventTextCanvas.Equals(EventTextCanvas.MessageBox))
                    {
                        PopupHandler.DisplayMessage(objectiveFailedEventText.Text);
                    }
                }

                MissionManager.MarkMissionAsFailed(mission.MissionID);
                mission.CurrentObjective = null;
            }
            else
            {
                failLogic.Invoke();
            }

            mission.OnFailed();

            if (mission.IsRestartAfterFail())
            {
                MissionManager.ResetMission(mission.MissionID);
            }
        }
 public override bool Activate()
 {
     game.player.UnlockDevelopHyperSpeed();
     PopupHandler.DisplayMessage(activationMessage);
     game.stateManager.overworldState.AddEffectsObject(ExplosionGenerator.GenerateSpaceDuckExplosion(game, game.spriteSheetVerticalShooter, spaceDuck));
     game.stateManager.overworldState.GetSectorX.RemoveGameObject(spaceDuck);
     return(true);
 }
Beispiel #11
0
        public override void OnFailed()
        {
            base.OnFailed();

            RemoveShips();
            OverworldShip.FollowPlayer = true;
            PopupHandler.DisplayMessage("The attack on the alliance freighter failed. Return to the rebel base to try again.");
        }
Beispiel #12
0
        public override void Invoke()
        {
            base.Invoke();

            game.stateManager.overworldState.RemoveOverworldObject(ship);
            game.stateManager.shooterState.BeginLevel(level);
            PopupHandler.DisplayMessage(encounterMessage);
        }
Beispiel #13
0
        public override void Invoke()
        {
            base.Invoke();

            ship.Explode();
            game.stateManager.overworldState.RemoveOverworldObject(ship);
            game.stateManager.shooterState.BeginPirateLevel();
            PopupHandler.DisplayMessage("You should have stayed in the warm comfort of you home planet. Surrender your cargo peacefully or take the consequences.");
        }
Beispiel #14
0
        public override Boolean Activate()
        {
            Boolean successfullyActivated = false;

            if (!IsCleared())
            {
                PopupHandler.DisplayMessage(interactText);
                startLevelWhenTextCleared = true;
                successfullyActivated     = true;
            }
            return(successfullyActivated);
        }
Beispiel #15
0
 //The function called when the class is activated.
 //For events inheriting from the "PointLevelEvent"-class
 //this is all that is executed before the event is removed.
 //Check "Swarm"-class to see how lasting events can look.
 public override void Run(GameTime gameTime)
 {
     if (portrait != PortraitID.None)
     {
         PopupHandler.DisplayPortraitMessage(portrait, message);
     }
     else
     {
         PopupHandler.DisplayMessage(message);
     }
     TriggerStatus = Trigger.Completed;
 }
        public override void Invoke()
        {
            if (StatsManager.reputation >= 0)
            {
                base.Invoke();

                ship.Explode();
                game.stateManager.overworldState.RemoveOverworldObject(ship);
                game.stateManager.shooterState.BeginRebelPirateLevel();
                PopupHandler.DisplayMessage(GetMessage());
            }
        }
Beispiel #17
0
        public override void OnFailed()
        {
            base.OnFailed();

            RemoveShips(allianceShips);
            RemoveShips(rebelShips1);
            RemoveShips(rebelShips2);

            allianceShips.Clear();
            rebelShips1.Clear();
            rebelShips2.Clear();

            PopupHandler.DisplayMessage("You failed to dispatch the treacherous alliance attack fleet leader and gain the trust of the rebels. Go back to Fortrun Station to try again.");
        }
        public override void Update(PlayTime playTime)
        {
            base.Update(playTime);

            if (GameStateManager.currentState == "OverworldState" &&
                !startMessageDisplayed)
            {
                startMessageDisplayed = true;
                PopupHandler.DisplayMessage(startMessage);
            }

            if (!deviationAllowed &&
                !CollisionDetection.IsPointInsideCircle(game.player.position, shipsToFollow[0].position, deviationRadius) &&
                outOfRangeTimer <= 0)
            {
                outOfRangeTimer = 150;
                PopupHandler.DisplayMessage(deviationMessage);

                foreach (OverworldShip ship in shipsToFollow)
                {
                    ship.Wait();
                }
            }

            if (!deviationAllowed &&
                outOfRangeTimer > 0)
            {
                outOfRangeTimer--;

                if (outOfRangeTimer == 149)
                {
                    game.player.InitializeHyperSpeedJump(shipsToFollow[0].position, false);
                }

                if (outOfRangeTimer < 1)
                {
                    outOfRangeTimer = -100;

                    foreach (OverworldShip ship in shipsToFollow)
                    {
                        ship.Start();
                    }
                }
            }
        }
Beispiel #19
0
        public override Boolean Activate()
        {
            itemBought = false;

            var responseChoices = new List <String>()
            {
                "Yes", "No"
            };

            PopupHandler.DisplaySelectionMenu(welcomeText, responseChoices, new List <System.Action>()
            {
                delegate
                {
                    if (!ShipInventoryManager.HasAvailableSlot())
                    {
                        PopupHandler.DisplayMessage(inventoryFullText);
                    }

                    else if (StatsManager.Crebits >= price)
                    {
                        PopupHandler.DisplayMessage(itemBoughtText);

                        StatsManager.Crebits -= price;
                        ShipInventoryManager.AddItem(item);
                        if (oneTimeOnly)
                        {
                            IsCleared();
                        }
                        itemBought = true;
                    }

                    else
                    {
                        PopupHandler.DisplayMessage(notEnoughMoneyText);
                    }
                },

                delegate
                {
                    PopupHandler.DisplayMessage(declinePurchaseText);
                }
            });

            return(true);
        }
Beispiel #20
0
        private void StartEnemyLevel(int enemyIndex, string level)
        {
            game.stateManager.shooterState.BeginLevel(level);
            game.stateManager.shooterState.CurrentLevel.SetFreighterMaxHP(shipToDefendMaxHP);
            game.stateManager.shooterState.CurrentLevel.SetFreighterHP(shipToDefendMaxHP);
            enemies.RemoveAt(enemyIndex);

            if (enemyMessages.Count > 0)
            {
                if (enemyPortraits[0] != PortraitID.None)
                {
                    PopupHandler.DisplayPortraitMessage(enemyPortraits[0], enemyMessages[0]);
                }
                else
                {
                    PopupHandler.DisplayMessage(enemyMessages[0]);
                }
                enemyMessages.RemoveAt(0);
                enemyPortraits.RemoveAt(0);
            }
        }
        public override void Invoke()
        {
            if (StatsManager.reputation < 0)
            {
                base.Invoke();

                game.stateManager.overworldState.RemoveOverworldObject(ship);
                ship.Explode();

                if (ship.Level == null ||
                    ship.Level.Equals(""))
                {
                    game.stateManager.shooterState.BeginAlliancePirateLevel();
                }
                else
                {
                    game.stateManager.shooterState.BeginLevel(ship.Level);
                }

                PopupHandler.DisplayMessage(GetMessage());
            }
        }
        public virtual void OnCompleted()
        {
            isOnCompletedCalled = true;

            if (objectiveCompletedEventText != null && objectiveCompletedEventText.Text != "")
            {
                if (eventTextCanvas.Equals(EventTextCanvas.BaseState))
                {
                    mission.MissionHelper.ShowEvent(objectiveCompletedEventText);
                }
                else if (eventTextCanvas.Equals(EventTextCanvas.MessageBox))
                {
                    if (usePortraits)
                    {
                        if (portraits != null &&
                            portraits.Count > 0)
                        {
                            PopupHandler.DisplayPortraitMessage(portraits, portraitTriggers, objectiveCompletedEventText.Text);
                        }
                        else
                        {
                            PopupHandler.DisplayPortraitMessage(portraits[0], objectiveCompletedEventText.Text);
                        }
                    }
                    else
                    {
                        PopupHandler.DisplayMessage(objectiveCompletedEventText.Text);
                    }
                }
            }

            if (completedLogic != null)
            {
                completedLogic.Invoke();
            }
        }
        public override void OnFailed()
        {
            base.OnFailed();

            PopupHandler.DisplayMessage("You could not reach the Murt before the Alliance and the rebels. Go to the Murt asteroid to try again.");
        }
        public void UpdateProgressionConditions()
        {
            // Screening off player from certain locations
            if (StatsManager.gameMode != GameMode.Develop &&
                mainInfiltration.MissionState != StateOfMission.CompletedDead &&
                mainInfiltration.ObjectiveIndex < 9)
            {
                if (!game.player.HyperspeedOn)
                {
                    if (CollisionDetection.IsRectInRect(game.player.Bounds,
                                                        game.stateManager.overworldState.GetRebelOutpost.SpaceRegionArea) &&
                        PopupHandler.MessageQueueCount <= 0)
                    {
                        PopupHandler.DisplayMessage("A large group of rebels prevents you from entering this area.");

                        game.player.BounceBack();
                    }
                }
            }

            // Unlock missions
            if (mainNewFirstMission.MissionState == StateOfMission.CompletedDead &&
                mainHighfence.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main1_2_ToHighfence);
                UnlockMission(MissionID.Side_FlightTraining);
            }

            if (mainHighfence.MissionState == StateOfMission.CompletedDead &&
                mainRebels.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main2_1_TheConvoy);
                askRebelMission = true;
            }

            if (mainRebels.MissionState == StateOfMission.Available &&
                game.stateManager.planetState.SubStateManager.ButtonControl == ButtonControl.Menu &&
                askRebelMission)
            {
                askRebelMission = false;
                game.stateManager.planetState.SubStateManager.ChangeMenuSubState("Mission");
                game.stateManager.planetState.SubStateManager.MissionMenuState.SelectedMission = mainRebels;
                game.stateManager.planetState.SubStateManager.MissionMenuState.DisplayMissionIntroduction();
            }

            if (mainRebels.MissionState == StateOfMission.CompletedDead &&
                mainToPhaseTwo.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main2_2_ToFortrun);
                MarkMissionAsActive(MissionID.Main2_2_ToFortrun);
            }

            if (mainToPhaseTwo.MissionState == StateOfMission.CompletedDead &&
                mainDefendColony.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main3_DefendColony);
                MarkMissionAsActive(MissionID.Main3_DefendColony);
            }

            if (mainDefendColony.ObjectiveIndex > 6 &&
                astroDodger.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Side_AstroDodger);
            }

            if (mainDefendColony.MissionState == StateOfMission.CompletedDead &&
                mainInfiltration.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main4_Infiltration);
            }

            if (mainInfiltration.MissionState == StateOfMission.CompletedDead &&
                mainRetaliation.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main5_Retribution);
                MarkMissionAsActive(MissionID.Main5_Retribution);
            }

            if (mainRetaliation.MissionState == StateOfMission.CompletedDead &&
                mainInTheNameOfScience.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main6_InTheNameOfScience);
            }

            if (mainInTheNameOfScience.MissionState == StateOfMission.CompletedDead &&
                mainInformation.MissionState == StateOfMission.Unavailable)
            {
                UnlockMission(MissionID.Main7_Information);
                MarkMissionAsActive(MissionID.Main7_Information);
            }

            if (mainInformation.MissionState == StateOfMission.Completed &&
                mainBeginningOfTheEnd.MissionState == StateOfMission.Unavailable)
            {
                mainInformation.MissionState = StateOfMission.CompletedDead;
                UnlockMission(MissionID.Main8_1_BeginningOfTheEnd);
                MarkMissionAsActive(MissionID.Main8_1_BeginningOfTheEnd);
                game.AutoSave();
            }

            // Start second mission after first is completed
            if (mainNewFirstMission.MissionState == StateOfMission.CompletedDead &&
                mainHighfence.MissionState == StateOfMission.Available &&
                mainHighfence.MissionHelper.IsPlayerOnStation("Border Station"))
            {
                MarkMissionAsActive(MissionID.Main1_2_ToHighfence);
            }

            // Start part 2 of final mission
            if (mainBeginningOfTheEnd.MissionState == StateOfMission.Completed &&
                mainTheEnd.MissionState == StateOfMission.Unavailable)
            {
                mainBeginningOfTheEnd.MissionState = StateOfMission.CompletedDead;
                UnlockMission(MissionID.Main8_2_TheEnd);
                MarkMissionAsActive(MissionID.Main8_2_TheEnd);
                game.AutoSave();
            }

            // Final mission stuff
            if ((mainTheEnd.MissionState == StateOfMission.Completed ||
                 (mainTheEnd.MissionState == StateOfMission.CompletedDead &&
                  !RebelFleet.IsShown)) &&
                GameStateManager.currentState.Equals("OverworldState"))
            {
                UnlockMission(MissionID.Main9_C_OnYourOwnArc);
                mainTheEnd.MissionState = StateOfMission.CompletedDead;

                RebelFleet rebelFleet = new RebelFleet(game,
                                                       game.stateManager.overworldState.GetSectorX.GetSpriteSheet(), Vector2.Zero);
                AllianceFleet allianceFleet = new AllianceFleet(game,
                                                                game.stateManager.overworldState.GetSectorX.GetSpriteSheet(), Vector2.Zero);
                RebelFleet.IsShown = true;

                rebelFleet.Initialize();
                allianceFleet.Initialize();

                game.stateManager.overworldState.AddOverworldObject(rebelFleet);
                game.stateManager.overworldState.AddOverworldObject(allianceFleet);

                game.AutoSave();
            }

            if (mainRebelArc.MissionState == StateOfMission.Completed)
            {
                mainRebelArc.MissionState = StateOfMission.CompletedDead;
                game.stateManager.outroState.SetOutroType(OutroType.RebelEnd);
                game.stateManager.ChangeState("OutroState");
            }

            else if (mainAllianceArc.MissionState == StateOfMission.Completed)
            {
                mainAllianceArc.MissionState = StateOfMission.CompletedDead;
                game.stateManager.outroState.SetOutroType(OutroType.AllianceEnd);
                game.stateManager.ChangeState("OutroState");
            }

            else if (mainOnYourOwnArc.MissionState == StateOfMission.Completed)
            {
                mainOnYourOwnArc.MissionState = StateOfMission.CompletedDead;
                game.stateManager.ChangeState("OverworldState");
                game.stateManager.overworldState.ActivateBurnOutEnding();
            }
        }
Beispiel #25
0
        public override void Update(PlayTime playTime)
        {
            base.Update(playTime);

            if (autofollow && started)
            {
                if (!escortDataCapsule.ShipToDefend.HasArrived)
                {
                    game.player.Direction.SetDirection(new Vector2(
                                                           escortDataCapsule.ShipToDefend.destination.X - game.player.position.X,
                                                           escortDataCapsule.ShipToDefend.destination.Y - game.player.position.Y));
                }

                game.player.speed = escortDataCapsule.ShipToDefend.speed;

                if (ControlManager.CheckPress(RebindableKeys.Pause) &&
                    GameStateManager.currentState.Equals("OverworldState"))
                {
                    PopupHandler.DisplaySelectionMenu("Do you want to skip travel?",
                                                      new List <string>()
                    {
                        "Yes", "No"
                    },
                                                      new List <System.Action>()
                    {
                        delegate
                        {
                            SkipForward();
                        },
                        delegate {}
                    });
                }
            }

            if (timedMessageCount >= 0 &&
                timedMessageCount < timedMessages.Count &&
                StatsManager.PlayTime.HasOverworldTimePassed(timedMessageTimes[timedMessageCount]))
            {
                if (timedMessagePortraits[timedMessageCount] != PortraitID.None)
                {
                    PopupHandler.DisplayRealtimePortraitMessage(3000, new [] { timedMessagePortraits[timedMessageCount] },
                                                                new List <int>(), timedMessages[timedMessageCount]);
                }
                else
                {
                    PopupHandler.DisplayRealtimeMessage(3000, timedMessages[timedMessageCount]);
                }
                timedMessageCount++;
            }

            // Player talks to freighter to begin escort
            if (!started &&
                GameStateManager.currentState.Equals("OverworldState") &&
                CollisionDetection.IsRectInRect(game.player.Bounds, escortDataCapsule.ShipToDefend.Bounds) &&
                ((ControlManager.CheckPress(RebindableKeys.Action1) || ControlManager.CheckKeyPress(Keys.Enter))))
            {
                if (showInventoryTutorial &&
                    ShipInventoryManager.equippedShield is EmptyShield)
                {
                    PopupHandler.DisplayPortraitMessage(introductionPortrait, "[Alliance Pilot] \"You need to equip a shield before we leave. Go to the shop next to Highfence and I will tell you what to do.");
                    game.tutorialManager.EnableEquipTutorial();
                }

                else
                {
                    if (introductionPortrait != PortraitID.None)
                    {
                        PopupHandler.DisplayPortraitMessage(introductionPortrait, introductionText);
                    }
                    else
                    {
                        PopupHandler.DisplayMessage(introductionText);
                    }

                    ((FreighterShip)escortDataCapsule.ShipToDefend).Start();
                    escortDataCapsule.ShipToDefend.speed = escortDataCapsule.FreighterSpeed;

                    started = true;

                    if (autofollow)
                    {
                        game.player.DisableControls();
                    }

                    this.Description = descriptions[0];

                    enemyAttackStartTime = StatsManager.PlayTime.GetFutureOverworldTime(escortDataCapsule.EnemyAttackStartTime);

                    for (int i = 0; i < timedMessages.Count; i++)
                    {
                        timedMessageTimes.Add(StatsManager.PlayTime.GetFutureOverworldTime(escortDataCapsule.TimedMessageTriggers[i]));
                    }
                    timedMessageCount = 0;
                }
            }

            // Escort mission begins
            if (started &&
                GameStateManager.currentState.Equals("OverworldState") &&
                numberOfEnemyShips > 0 &&
                StatsManager.PlayTime.HasOverworldTimePassed(enemyAttackStartTime))
            {
                // Ready to spawn a new enemy ship
                if (StatsManager.PlayTime.HasOverworldTimePassed(enemyNextWaveTime))
                {
                    int i = startingNumberOfEnemyShips - numberOfEnemyShips;

                    if (descriptions.Count > 0)
                    {
                        if (descriptions.Count > 1)
                        {
                            descriptions.RemoveAt(0);
                        }

                        this.Description = descriptions[0];
                    }

                    if (attackStartPortraits[i] != PortraitID.None)
                    {
                        PopupHandler.DisplayPortraitMessage(attackStartPortraits[i], attackStartText[i]);
                    }
                    else
                    {
                        PopupHandler.DisplayMessage(attackStartText[i]);
                    }

                    game.stateManager.overworldState.GetSectorX.shipSpawner.AddOverworldShip(
                        enemies[0],
                        escortDataCapsule.ShipToDefend.position +
                        (650 * escortDataCapsule.ShipToDefend.Direction.GetDirectionAsVector()),
                        levels[levelIndex], escortDataCapsule.ShipToDefend);

                    numberOfEnemyShips--;

                    if (numberOfEnemyShips > 0)
                    {
                        enemyNextWaveTime = StatsManager.PlayTime.GetFutureOverworldTime(escortDataCapsule.EnemyAttackFrequency);
                    }
                }
            }

            // Transfers freigter hp between levels
            for (int i = 0; i < levels.Count; i++)
            {
                if (GameStateManager.currentState.Equals("ShooterState") &&
                    game.stateManager.shooterState.CurrentLevel.Identifier.Equals(levels[i]) &&
                    game.stateManager.shooterState.GetLevel(levels[i]).IsObjectiveCompleted)
                {
                    shipToDefendHP = game.stateManager.shooterState.CurrentLevel.GetFreighterHP();

                    levelCompleted      = true;
                    levelCompletedIndex = i;
                    levelIndex          = i + 1;
                }
            }

            if (GameStateManager.currentState.Equals("OverworldState"))
            {
                if (levelCompleted &&
                    levelCompletedIndex > lastLevelCompletedIndex)
                {
                    levelCompleted          = false;
                    lastLevelCompletedIndex = levelCompletedIndex;

                    if (afterAttackPortraits[levelCompletedIndex] != PortraitID.None)
                    {
                        PopupHandler.DisplayPortraitMessage(afterAttackPortraits[levelCompletedIndex],
                                                            afterAttackMessages[levelCompletedIndex]);
                    }
                    else
                    {
                        PopupHandler.DisplayMessage(afterAttackMessages[levelCompletedIndex]);
                    }
                }
                else
                {
                    levelCompleted = false;
                }
            }

            Collision();
        }
        public override void OnFailed()
        {
            base.OnFailed();

            PopupHandler.DisplayMessage("You could not defend the Murt from the Alliance, return to the rebel fleet outside Telmun to try again.");
        }
Beispiel #27
0
 public override void OnFailed()
 {
     base.OnFailed();
     PopupHandler.DisplayMessage("The freighter was destroyed and the mission failed. Return to Highfence to try again.");
 }
        public override void OnFailed()
        {
            base.OnFailed();

            PopupHandler.DisplayMessage("The operation was a failure. Return to Fortrun Station to try again.");
        }
Beispiel #29
0
        public override void OnFailed()
        {
            base.OnFailed();

            PopupHandler.DisplayMessage("You did not manage to shake off the suspicious rebels. Go back to the rebel base to try again.");
        }
Beispiel #30
0
 public override Boolean Activate()
 {
     PopupHandler.DisplayMessage(text.ToArray());
     return(true);
 }