Exemplo n.º 1
0
        public void Transition(IScene pNextScene, bool replaceCurrent = true)
        {
            IScene currentScene = Top;

            // gain access to the scene before the current scene
            if (pNextScene == null)
            {
                pNextScene = Previous;
            }
            if (replaceCurrent)
            {
                Pop();
            }
            if (pNextScene != null)
            {
                IScene transitionScene = new TransitionScene(currentScene, pNextScene);
                mScenes.Add(transitionScene);
            }
            else
            {
                // we should exit the game here...
                Tankontroller game = (Tankontroller)Tankontroller.Instance();
                game.Exit();
            }
        }