// Monogame Methods protected override void Initialize() { // TODO: Add your initialization logic here playerBoard = new Gameboard(this); //create size TOTALWIDTH = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; TOTALHEIGHT = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; //full screen playUI = new PlaytimeUI(TOTALWIDTH, TOTALHEIGHT, this); playerBoard.RefUI(); //create window graphics.IsFullScreen = true; graphics.PreferredBackBufferWidth = TOTALWIDTH; graphics.PreferredBackBufferHeight = TOTALHEIGHT; graphics.ApplyChanges(); mainMenu = new MainMenu(); mainMenu.Activate(); mainMenu.Enabled = true; mainMenu.Show(); // end window //Cursor cursor = new AwCursor(playerBoard, this, PlayUI.PlayArea); base.Initialize(); }
// Constructors public AwCursor(Gameboard gameBoard, Game1 gameRef, Rectangle playAreaRef) { cursorPos = new Vector2(0, 0); offsetIndex = new Vector2(0, 0); boardReference = gameBoard; gameReference = gameRef; playArea = playAreaRef; }