コード例 #1
0
        public PlayingGameState()
        {
            DifficultySettings.SetDifficulty(DifficultyEnum.Easy);

            _crosshair = new Crosshair();

            _background = new Background();
            _fps        = new FontRender("fps counter");
            _fps.LoadContent("default");
            _fps.Location = new Vector2(40, Engine.ScaledViewPort.Y - 50);

            _score           = new ScoreBoard("score board");
            _hud             = new Hud("Hud");
            _levelController = new LevelController(new LevelBuilder().Levels);

            NextLevel();

            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER4, _hud);
            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER1, _background);
            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER4, _fps);
            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER4, _score);
            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER4, _billboard);
            _scene.AddSpriteToLayer(RenderLayerEnum.LAYER5, _crosshair);

            Channels.AddNewChannel("score");
            Channels.AddNewChannel("duckhit");
            Channels.AddNewChannel("gunfired");

            _billboard.StartBillBoard("Level " + _levelController.LevelNumber);
        }