public void Draw(SpriteBatch spriteBatch, GridLayout gridLayout, Camera2D camera) { spriteBatch.DrawGrid(sizeX, sizeY, gridLayout.SquareSize, gridLayout.Position, gridLayout.Color, gridLayout.LineThickness); DrawSquares(spriteBatch, gridLayout, camera); }
/// <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() { // Create grid layout settings gridLayout = new GridLayout(20, new Vector2(1, 0), 1f, Color.White, new Color(Color.White, 55)); base.Initialize(); }