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; }
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(); }
/// <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; }