Esempio n. 1
0
        public void SetActivePlayer(PlayerArtifact.Name name)
        {
            //GameManager pMan = GameManager.PrivInstance();
            //Debug.Assert(pMan != null);

            if (name == PlayerArtifact.Name.PlayerOne)
            {
                Debug.Assert(this.poPlayer1 != null);
                this.pActivePlayer = this.poPlayer1;;
            }
            else
            {
                Debug.Assert(this.poPlayer2 != null);
                this.pActivePlayer = this.poPlayer2;
            }
        }
Esempio n. 2
0
        private GameManager()
        {
            this.poAttractScreenState = new AttractScreenState();
            this.poSelectScreenState  = new SelectScreenState();
            this.poGamePlayState      = new GamePlayState();
            this.poGamerOverState     = new GameOverState();

            this.poOnePlayerStrategy = new OnePlayerStrategy();
            this.poTwoPlayerStrategy = new TwoPlayerStrategy();

            this.poPlayer1 = new PlayerArtifact(PlayerArtifact.Name.PlayerOne);
            this.poPlayer2 = new PlayerArtifact(PlayerArtifact.Name.PlayerTwo);

            this.pGame      = null;
            this.pGameState = null;
            this.pActiveGameModeStrategy = null;
            this.pActivePlayer           = null;

            this.highScore   = 0;
            this.gameMode    = Mode.OnePlayerMode;
            this.levelUpFlag = false;
        }