示例#1
0
        public GameState(Game1 game, GraphicsDevice graphicsDevice, ContentManager content, bool newGame) : base(game, graphicsDevice, content)
        {
            this.newGame = newGame;
            _font        = content.Load <SpriteFont>("Components/Font");
            _champ       = Champion.GetInstance();
            _champ.SetSoundManagerContent(content);
            _champ.Attach(game);


            if (game.getEasyLevel() == true)
            {
                level_generator = new EasyLevelGenerator(content);
            }
            else
            {
                level_generator = new HardLevelGenerator(content);
            }
            inputManager = InputManager.GetInstance();
            Champion.SetContent(content);
            if (newGame)
            {
                _champ.ResetValues();
                SetLevel();
            }
            if (_champ.level == 1)
            {
                _champ.SetValuesToStandard();
            }
            _game.PlaySong("gameplay");
        }