Beispiel #1
0
        /// <summary>
        /// Shows reason of gameover
        /// </summary>
        /// <param name="reason"></param>
        public virtual void ShowGameOverReason(StageEndReason reason)
        {
            if (FeedBackSchermLock)
            {
                return;
            }
            FeedBackSchermLock = true;
            UIRootFloor.SetActive(false);
            GameOverScreen.SetActive(true);

            switch (reason)
            {
            case StageEndReason.AgentDied:
                GameOverScreenText.text = "JE BENT GERAAKT.";
                break;

            case StageEndReason.CivilianDied:
                GameOverScreenText.text = "JE HEBT EEN BURGER GERAAKT.";
                break;

            case StageEndReason.OutOfAmmo:
                GameOverScreenText.text = "JE 15 KOGELS ZIJN OP.";
                break;

            case StageEndReason.Succes:
                GameOverScreenText.text = "GOED GEDAAN!";
                break;

            default:
                GameOverScreenText.text = "GAME OVER";
                break;
            }
        }
Beispiel #2
0
 public override void ShowGameOverReason(StageEndReason reason)
 {
 }
Beispiel #3
0
        /// <summary>
        /// Handles the ending of a stage
        /// </summary>
        /// <param name="stage">stage to be ended</param>
        /// <param name="reason">reason why the stage ended</param>
        private void EndStage(Stage stage, StageEndReason reason)
        {
            Time.timeScale = 0f;
            Started        = false;

            // Handle every case
            switch (stage)
            {
            case Stage.None: break;

            case Stage.ShowWorld:
                Play();
                break;

            case Stage.Movement:
                Play();
                break;

            case Stage.GoalExplention:
                SetMenuEnabled(false);
                Play();
                break;

            case Stage.Cover:
                EnableCoverBodies(false);
                break;

            case Stage.Practise:

                switch (reason)
                {
                case StageEndReason.Succes:
                    string c = "";
                    Messages.TryGetValue("PractiseSucces", out c);
                    SetMenuText(c);

                    Scenario.GameOver.instance.SetEndscreen(true);
                    SetMenuStart(false);
                    SetMenuEnabled(true);
                    break;

                case StageEndReason.AgentDied:
                    string d = "";
                    Messages.TryGetValue("PractiseAgent", out d);
                    SetMenuText(d);

                    HasLostBefore = true;
                    SetMenuEnabled(true);
                    Scenario.GameOver.instance.SetEndscreen(false);
                    break;

                case StageEndReason.CivilianDied:
                    string x = "";
                    Messages.TryGetValue("PractiseCiv", out x);
                    SetMenuText(x);

                    HasLostBefore = true;
                    SetMenuEnabled(true);
                    Scenario.GameOver.instance.SetEndscreen(false);
                    break;

                case StageEndReason.OutOfAmmo:
                    string y = "";
                    Messages.TryGetValue("PracticeAmmo", out y);
                    SetMenuText(y);

                    HasLostBefore = true;
                    SetMenuEnabled(true);
                    Scenario.GameOver.instance.SetEndscreen(false);
                    break;
                }
                UIRootFloor.SetActive(true);
                IngameMenuStartButton.SetActive(false);
                break;
            }
        }