Beispiel #1
0
        private void LoadSpecial(string gamePath)
        {
            var gl = new GameLoader(gamePath);

            gl.Load();
            var entrySceneManager = gl.GetEntrySceneManager();

            sceneManager.LoadingScene = gl.GetLoading(device);
            SetPropertyToScene(sceneManager.LoadingScene);
            var spriteResourceManager = new PPDFramework.Resource.SpriteResourceManager(device, entrySceneManager.SpriteDir);

            sceneManager.LoadingScene.ResourceManager = spriteResourceManager;
            sceneManager.LoadingScene.Load();

            var scene = entrySceneManager.GetSceneWithArgs(device, Args, out Dictionary <string, object> dic);

            if (!String.IsNullOrEmpty(scene.SpriteDir))
            {
                spriteResourceManager = new PPDFramework.Resource.SpriteResourceManager(device, scene.SpriteDir);
            }
            sceneManager.ChangeGame(scene, dic, spriteResourceManager);

            currentGame = gl;
            debugMode   = true;
        }
Beispiel #2
0
        public void StartGame(GameLoader gl)
        {
            currentGame = gl;
            var entrySceneManager = gl.GetEntrySceneManager();

            sceneManager.LoadingScene = gl.GetLoading(device);
            SetPropertyToScene(sceneManager.LoadingScene);
            var spriteResourceManager = new PPDFramework.Resource.SpriteResourceManager(device, entrySceneManager.SpriteDir);

            sceneManager.LoadingScene.ResourceManager = spriteResourceManager;
            sceneManager.LoadingScene.Load();
            var scene = entrySceneManager.GetSceneWithArgs(device, Args, out Dictionary <string, object> dict);

            sceneManager.ChangeGame(scene, dict, spriteResourceManager);
            isHome = false;
        }