public static void changeScenes(string destination, string currentLoc)
        {
            string mapName   = destination.Split('_')[0];
            string sceneType = destination.Split('_')[1];

            if (sceneType == "Outdoors")
            {
                BaseScene currentScene = (BaseScene)Core.scene;
                Player    player       = new Player("player");

                OutdoorScene destScene = new OutdoorScene(mapName, currentLoc, player);

                destScene.initializeView();

                Core.startSceneTransition(new FadeTransition(() => destScene as OutdoorScene));
            }
            else if (sceneType == "Indoors")
            {
                BaseScene currentScene = (BaseScene)Core.scene;
                Player    player       = new Player("player");

                IndoorScene destScene = new IndoorScene(mapName, currentLoc, player);

                destScene.initializeView();

                Core.startSceneTransition(new FadeTransition(() => destScene as IndoorScene));
            }
        }
Example #2
0
        protected override void Initialize()
        {
            base.Initialize();
            Window.AllowUserResizing = true;
            Player player = new Player("player");

            var firstScene = new IndoorScene("Indoors1", "Outdoors1", player);

            firstScene.initializeView();
            //var myScene = new Outdoors1();
            //scene = myScene;

            scene = firstScene;
        }