project-kyoku/src/classicgame/classicsprite.cpp

17 lines
372 B
C++
Raw Normal View History

#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);
}