#include "grid_debug_layer.h" #include "../primitives/circle_object.h" #include "../config.h" GridDebugLayer::GridDebugLayer(int minX, int maxX, int minY, int maxY) { // Generate markers for (int x = minX; x <= maxX; x++) { for (int y = minY; y <= maxY; y++) { auto *gameObject = new CircleObject(DB_ISOPLANE_CORNER_RADIUS, sf::Color::Red); gameObject->coordinates.set(WorldCoordinates(x, y, 0)); marker.push_back(gameObject); } } } GridDebugLayer::~GridDebugLayer() { for (auto &gameObject: marker) { delete gameObject; } } void GridDebugLayer::draw(sf::RenderWindow *window) const { for (auto &gameObject: marker) { gameObject->draw(window); } } void GridDebugLayer::update() const { }