Exemple #1
0
        protected virtual void SceneInit()
        {
            if (SceneManager.GetActiveScene().name == "1-Childhood")
            {
                //MMDebug.DebugLogTime("scene init, scene name : " + SceneManager.GetActiveScene().name + " clear");
                Content.Clear();
            }

            if ((SceneManager.GetActiveScene().name == "2-Adolescence") ||
                (SceneManager.GetActiveScene().name == "3-Adulthood") ||
                (SceneManager.GetActiveScene().name == "4-OldAge")
                )
            {
                foreach (FollowerData data in Content)
                {
                    _follower       = Instantiate(FollowerPrefab);
                    _follower.Data  = data;
                    _newPosition    = LevelManager.Instance.Players[0].transform.position;
                    _newPosition.x -= 10f;
                    _follower.transform.position = _newPosition;
                    _follower.TargetBuyZone.gameObject.SetActive(false);
                    StartCoroutine(_follower.StartFollowing());
                    CorgiEngineEvent.Trigger(CorgiEngineEventTypes.SortFollowers);
                }
            }

            if (SceneManager.GetActiveScene().name == "5-End")
            {
                Story += "\n\n";

                Story += "At the end you had ";

                for (int i = 0; i < Content.Count; i++)
                {
                    if (i < Content.Count - 2)
                    {
                        Story += "<color=red>" + Content[i].MessageDisplayText + "</color>, ";
                    }
                    if (i == Content.Count - 2)
                    {
                        Story += "<color=red>" + Content[i].MessageDisplayText + "</color> and ";
                    }
                    if (i == Content.Count - 1)
                    {
                        Story += "finally <color=red>you died</color>.";
                    }
                }

                Story += "\n\n";

                Story += "This was your life. You could have done better. Press any key to try a new life and maybe make better choices.";
            }
        }