Пример #1
0
        /// <summary>
        /// Initialized the game.
        /// </summary>
        public void InitializeGame()
        {
#if DEB
            if (GUIReferences.InputListener == null)
            {
                DebugUtil.Error("INPUT LISTENER IS NULL. PLEASE BAKE THE GAME HOLDER!");
            }
            if (GUIReferences.TerminalComponent == null)
            {
                DebugUtil.Error("TERMINAL COMPONENT IS NULL. PLEASE BAKE THE GAME HOLDER!");
            }
#endif

            Constants.Colors           = Colors;
            DataHolder.DebugCondition  = DebugCondition;
            DataHolder.GUIReferences   = GUIReferences;
            DataHolder.DreamReferences = DreamReferences;

            DataHolder.GUIReferences.TerminalComponent.Initialize();
            StoryUtil.Init();
            LoopUtil.Init();
            WindowUtil.Initialize();
            DataUtil.LoadData();
            ProgramUtil.SetupPrograms();
            GUIUtil.SetCursorToDefault();

            TerminalUtil.HideTerminal();
            AnnouncementUtil.HideAnnouncement();

            DreamUtil.ExecuteDreamOne();
        }
Пример #2
0
        private static IEnumerator InternalExecuteDreamOne()
        {
            PrepareForDream();

            var dreamOne  = DataHolder.DreamReferences.DreamOne;
            var sceneLoad = SceneManager.LoadSceneAsync(dreamOne.Scene, LoadSceneMode.Additive);

            yield return(AnnouncementUtil.RunAnnouncement(dreamOne.DreamAnnouncement));

            yield return(sceneLoad);

            AnnouncementUtil.HideAnnouncement();

            var dreamOneComponent = GameObject.FindObjectOfType <DreamOneReferences>();

            DebugUtil.Assert(dreamOneComponent == null, "No dream one component on dream one scene!");

            DreamOneController.Run(dreamOneComponent, EndDreamOne);
        }