예제 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            GameScene.AddScene(new MainMenuScene(this));
            GameScene.AddScene(new MainGameScene(this));

            //GameScene.SwitchScene<MainMenuScene>();
            GameScene.SwitchScene <MainGameScene>();
        }
예제 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            this.spriteBatch = new SpriteBatch(GraphicsDevice);
            this.Services.AddService(typeof(SpriteBatch), this.spriteBatch);

            GameConfig.Fonts.VerySmall = Assets.Get <SpriteFont>("Fonts/Arial_8");
            GameConfig.Fonts.Small     = Assets.Get <SpriteFont>("Fonts/Arial_12");
            GameConfig.Fonts.Medium    = Assets.Get <SpriteFont>("Fonts/Arial_16");
            GameConfig.Fonts.Large     = Assets.Get <SpriteFont>("Fonts/Arial_24");
            GameConfig.Fonts.VeryLarge = Assets.Get <SpriteFont>("Fonts/Arial_32");

            this.perfLabel           = new Label(GameConfig.Fonts.Medium, "Perf");
            this.perfLabel.Alignment = Alignment.Top;
#if DEBUG
            this.mousePos           = new Label(GameConfig.Fonts.Small, "MousePos");
            this.mousePos.Alignment = Alignment.Left;
            this.mousePos.SetVisible(false);

            this.CreateDebugPanel();
#endif

            GameScene.AddScene(new MainMenuScene(this));
            GameScene.AddScene(new SingleplayerGameScene(this));
            GameScene.AddScene(new SettingsMenuScene(this));
            GameScene.AddScene(new GameOverScene(this));

            GameScene.AddScene(new ConnectingScene(this, this.networkManager, this.connectionInfo));
            GameScene.AddScene(new ConnectionErrorScene(this, this.networkManager, this.connectionInfo));
            GameScene.AddScene(new MultiplayerGameOverScene(this, this.networkManager, this.connectionInfo));
            GameScene.AddScene(new MultiplayerGameScene(this, this.networkManager, this.connectionInfo));
            GameScene.AddScene(new MultiplayerLobbyScene(this, this.networkManager, this.connectionInfo));
            GameScene.AddScene(new WaitingForGameStartScene(this, this.networkManager, this.connectionInfo));

            GameScene.SwitchScene <MainMenuScene>();

            base.LoadContent();
        }