2021-06-09 20:08:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
2021-08-05 20:59:48 +02:00
|
|
|
#include "tools/mathutils.h"
|
2021-09-14 21:02:23 +02:00
|
|
|
#include "sprite.h"
|
|
|
|
#include <SFML/Graphics/RectangleShape.hpp>
|
2021-06-09 20:08:58 +02:00
|
|
|
|
|
|
|
class ClassicSprite : public Sprite, public sf::Drawable
|
|
|
|
{
|
|
|
|
public:
|
2021-10-04 16:20:24 +02:00
|
|
|
explicit ClassicSprite(const sf::RectangleShape& shape);
|
2021-06-09 20:08:58 +02:00
|
|
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const override;
|
2021-06-16 17:16:18 +02:00
|
|
|
virtual void reset() override;
|
2021-06-09 20:08:58 +02:00
|
|
|
|
2021-10-04 16:20:24 +02:00
|
|
|
void setCoordinates(const Coordinates &coordinates);
|
|
|
|
void setTrailCoordinates(const Coordinates &coordinates);
|
2021-06-24 20:04:09 +02:00
|
|
|
Coordinates coordinates() const;
|
2021-07-15 04:45:52 +02:00
|
|
|
Coordinates trailCoordinates() const;
|
2021-06-16 17:16:18 +02:00
|
|
|
|
2021-10-04 16:20:24 +02:00
|
|
|
void setColor(const sf::Color& color);
|
|
|
|
void setTrailColor(const sf::Color& color);
|
|
|
|
sf::Color color() const;
|
|
|
|
sf::Color trailColor() const;
|
2021-06-09 20:08:58 +02:00
|
|
|
|
|
|
|
private:
|
2021-06-16 19:11:00 +02:00
|
|
|
sf::RectangleShape _prototype;
|
|
|
|
|
2021-06-09 20:08:58 +02:00
|
|
|
sf::RectangleShape _shape;
|
2021-06-11 18:58:44 +02:00
|
|
|
sf::RectangleShape _trail;
|
2021-06-09 20:08:58 +02:00
|
|
|
};
|