コード例 #1
0
        public static GameScreen Create(ScreenManager screenManager)
        {
            GCM gcm = screenManager.AsDynamic().GCM;

            void Noop()
            {
                var gameplayScreen = screenManager.FirstOrDefault <GameplayScreen>();

                if (gameplayScreen != null && gameplayScreen.Settings != null)
                {
                    gcm.UpdateMinimapColors(gameplayScreen.Settings);
                }
            }

            gcm.LoadAllResources(screenManager.AsDynamic().GeneralContentManager, screenManager.GraphicsDevice);

            return((GameScreen)Activator.CreateInstance(JournalMenuType, GameSave.DemoSave, gcm, (Action)Noop));
        }