public IEnumerator LoadGameCoroutine()
        {
            // do game startup stuff here

            TResourceManager.RegisterHandler(new LBDHandler());
            TResourceManager.RegisterHandler(new TIXHandler());
            TResourceManager.RegisterHandler(new Texture2DHandler());
            TResourceManager.RegisterHandler(new MOMHandler());
            TResourceManager.RegisterHandler(new ToriiAudioClipHandler());
            TResourceManager.RegisterHandler(new TIXTexture2DHandler());

            Screenshotter.Instance.Init();

            // set the sort order for the fader so the version text appears on top during fades
            ToriiFader.Instance.SetSortOrder(0);

            Shader.SetGlobalFloat("_FogStep", 0.08F);
            Shader.SetGlobalFloat("AffineIntensity", 0.5F);

            // okay, it's a fake loading screen LOL
            // it used to be real but it's been optimised away and I liked the animation too much
            if (!Application.isEditor)
            {
                yield return(new WaitForSeconds(3));
            }
            else
            {
                yield return(null);
            }

            GameLoaded = true;

            OnGameDataLoaded.Raise();
        }
示例#2
0
        public IEnumerator LoadGameCoroutine()
        {
            // do game startup stuff here

            GameSettings.Initialize();

            TResourceManager.RegisterHandler(new LBDHandler());
            TResourceManager.RegisterHandler(new TIXHandler());
            TResourceManager.RegisterHandler(new Texture2DHandler());
            TResourceManager.RegisterHandler(new MaterialHandler());

            ControlSchemeManager.Initialize();

            DreamJournalManager.Initialize();

            MapReader.MapScaleFactor = 1F;

            GameSettings.LoadSettings();

            Shader.SetGlobalFloat("_FogStep", 0.08F);
            Shader.SetGlobalFloat("AffineIntensity", 0.5F);

            PsxVram.Initialize();

            if (Application.isEditor)
            {
                // if we're running inside the editor, we want to have the mouse!
                GameSettings.SetCursorViewState(true);
            }

            yield return(LBDTilePool.InitialiseCoroutine());

            // TODO
            //SaveGameManager.LoadGame();

            OnGameDataLoaded.Raise();
        }