Ejemplo n.º 1
0
        private SceneMan()
        {
            // Store the states
            this.pStateTract    = new SceneStateTract();
            this.pStateGame     = new SceneStateGame();
            this.pStateGameover = new SceneStateGameover();

            // set active
            this.pScene = null;
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
            GameObject pUFORoot = GameObjectMan.Find(GameObject.Name.UFORoot);
            UFO        pUFO     = (UFO)Iterator.GetChild(pUFORoot);

            pUFO.StopSound();

            String pScore1    = Int32.Parse(FontMan.Find(Font.Name.Score1).GetMessage()).ToString().PadLeft(4, '0');
            String pScore2    = Int32.Parse(FontMan.Find(Font.Name.Score2).GetMessage()).ToString().PadLeft(4, '0');
            String pScoreHigh = Int32.Parse(FontMan.Find(Font.Name.ScoreHigh).GetMessage()).ToString().PadLeft(4, '0');

            if (this.state == false)
            {
                SceneStateGameover.SetScore1(pScore1);
                SceneStateGameover.SetScore2(pScore2);
                SceneStateGameover.SetScoreHigh(pScoreHigh);
            }

            SceneStateGame.SetScore1(pScore1);
            SceneStateGame.SetScore2(pScore2);
            SceneStateGame.SetScoreHigh(pScoreHigh);

            GameObjectNode pGhostGameObj = GhostGameObjectMan.Find(GameObject.Name.AlienGroup);

            if (pGhostGameObj != null)
            {
                SceneStateGame.SetLoadGhost(true);
            }

            GameObject pGameObj = GameObjectMan.Find(GameObject.Name.AlienGroup);

            GhostGameObjectMan.Attach(pGameObj);

            SceneStateGame.SetStay(this.state);
            Scene pScene = SceneMan.GetScene();

            pScene.Unload();
        }