public MenuViewLayer(Menu menu, SpriteFont font) { _menu = menu; _font = font; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { _currentScreen = Screen.Menu; IsMouseVisible = true; _camera = new Camera(_graphics); // Why is the board starting at (1600,1100)? No one knows.... _camera.PointTo(new Vector2(1600, 1100)); _controller = Controller.DefaultInstance; _selectionManager = _controller; _oldKeyboardState = Keyboard.GetState(); _boardViewLayer = new BoardViewLayer(_graphics, _controller); _handViewLayer = new HandViewLayer(_graphics, _controller) {IsCustom = false}; _customViewLayer = new HandViewLayer(_graphics, _controller) {IsCustom = true}; _menu = new Menu(); // a blank tile for each player, colors get added later _playerSelection = new Tile[_controller.Players.Count()]; for (int i = 0; i<_controller.Players.Count(); i++) _playerSelection[i] = new Blank {Owner = _controller.Players.ElementAt(i), Space = new Space()}; _selectionPoint = new Point(0, 0); _moveCamera = true; _oldColor = Color.Wheat; _displayHelp = false; _endGame = false; _aiParams = null; base.Initialize(); }