30 lines
825 B
C++
30 lines
825 B
C++
#pragma once
|
|
|
|
#include "tools/mathutils.h"
|
|
#include "sprite.h"
|
|
#include <SFML/Graphics/RectangleShape.hpp>
|
|
|
|
class ClassicSprite : public Sprite, public sf::Drawable
|
|
{
|
|
public:
|
|
explicit ClassicSprite(const sf::RectangleShape& shape);
|
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const override;
|
|
virtual void reset() override;
|
|
|
|
void setCoordinates(const Coordinates &coordinates);
|
|
void setTrailCoordinates(const Coordinates &coordinates);
|
|
Coordinates coordinates() const;
|
|
Coordinates trailCoordinates() const;
|
|
|
|
void setColor(const sf::Color& color);
|
|
void setTrailColor(const sf::Color& color);
|
|
sf::Color color() const;
|
|
sf::Color trailColor() const;
|
|
|
|
private:
|
|
sf::RectangleShape _prototype;
|
|
|
|
sf::RectangleShape _shape;
|
|
sf::RectangleShape _trail;
|
|
};
|