21 lines
483 B
C++
21 lines
483 B
C++
|
//
|
||
|
// Created by max on 27.04.23.
|
||
|
//
|
||
|
|
||
|
#include <SFML/Graphics/CircleShape.hpp>
|
||
|
#include "circle_object.h"
|
||
|
|
||
|
CircleObject::CircleObject(int radius, sf::Color color) : radius(radius), color(color) {
|
||
|
|
||
|
}
|
||
|
|
||
|
void CircleObject::draw(sf::RenderTarget &target, sf::RenderStates states) const {
|
||
|
sf::CircleShape circle(radius);
|
||
|
circle.setFillColor(color);
|
||
|
circle.setPosition(coordinates->getScreenCoordinates().x, coordinates->getScreenCoordinates().y);
|
||
|
|
||
|
target.draw(circle);
|
||
|
}
|
||
|
|
||
|
|