示例#1
0
        public GameManager(GameWindow window, StartMenu startMenu, TextureManager textureManager)
        {
            //Should get the number of players from the start screen or something, can send that as an argument for the GameManager
            this.window = window;
            rand = new Random();

            players = new Player[startMenu.GetNumPlayers];
            bookManager = new BookManager(textureManager);

            market = new Market(textureManager, new Vector2(20, 20), 31, 13, rand);
            economyManager = new Economy();

            GameStart(textureManager, startMenu);

            backgroundTexture = textureManager.backgroundTexture;
        }
示例#2
0
        private void GameStart(TextureManager textureManager, StartMenu startMenu)
        {
            currentTurn = 1;
            phase = TurnPhase.BookPicking;
            inputManager = new InputManager(players.Length);

            for (int i = 0; i < players.Length; i++)
                players[i] = new Player(textureManager, i);

            bookManager.archive.ClearArchive();

            bookManager.GenerateBooks();
        }
示例#3
0
文件: Main.cs 项目: Blinke/Planspelet
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            fontSmall = Content.Load<SpriteFont>("fontSmall");
            fontLarge = Content.Load<SpriteFont>("fontLarge");

            textureManager = new TextureManager();
            textureManager.LoadTextures(Content, graphics.GraphicsDevice);
            startMenu = new StartMenu(new Vector2(200, 600), textureManager, fontLarge);
            //gameManager = new GameManager(Window, textureManager, 1);
            spriteBatch = new SpriteBatch(GraphicsDevice);

            gameState = GameState.StartScreen;
        }