2021-06-09 14:08:58 -04:00
|
|
|
#include "classicsprite.h"
|
|
|
|
#include <SFML/Graphics/RenderTarget.hpp>
|
|
|
|
|
|
|
|
ClassicSprite::ClassicSprite(const sf::RectangleShape& shape) :
|
|
|
|
_shape(shape)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void ClassicSprite::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
|
|
|
{
|
|
|
|
target.draw(_shape, states);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ClassicSprite::setCoordinates(float x, float y) noexcept
|
|
|
|
{
|
|
|
|
_shape.setPosition(x, y);
|
|
|
|
}
|