Exemplo n.º 1
0
        public void SwitchScenes(Scene newScene)
        {
            SoundEffect s = contentManager.Load <SoundEffect>("Audio/SFX/switch");

            s.Play();
            if (scene.kind != newScene)
            {
                scene.Stop();
                scene.Suspend();
                if (newScene == Scene.LOAD)
                {
                    scene = load;
                }
                else if (newScene == Scene.INTRO)
                {
                    scene = intro;
                }
                else if (newScene == Scene.ACTION)
                {
                    scene = action;
                }
                else if (newScene == Scene.EDITOR)
                {
                    scene = editor;
                }
                scene.running = true;
                scene.Activate();
                input.SwitchScenes(scene);
            }
        }