project-kyoku/modes/classicmode/game/classicsprite.h

30 lines
825 B
C
Raw Normal View History

#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;
2021-07-15 04:45:52 +02:00
Coordinates trailCoordinates() const;
void setColor(const sf::Color& color);
void setTrailColor(const sf::Color& color);
sf::Color color() const;
sf::Color trailColor() const;
private:
2021-06-16 19:11:00 +02:00
sf::RectangleShape _prototype;
sf::RectangleShape _shape;
2021-06-11 18:58:44 +02:00
sf::RectangleShape _trail;
};