public void Debug(Renderer renderer) { ShaderProgram shader = renderer.GetShader(); if (debugSprites == null) { debugSprites = new Sprite[this.width, this.height]; for (int w = 0; w < this.width; w++) { for (int h = 0; h < this.height; h++) { debugSprites[w, h] = new Sprite(GetCellLocationInWorld(w, h), new Vector2(cellSize - 0.2f), Vector2.Zero, shader); renderer.AddEntity(debugSprites[w, h]); } } } }