37 lines
633 B
C++
37 lines
633 B
C++
#ifndef NOTESPRITE_H
|
|
#define NOTESPRITE_H
|
|
|
|
#include <SFML/Graphics/Drawable.hpp>
|
|
#include <SFML/Graphics/Transformable.hpp>
|
|
|
|
class NoteSprite : public sf::Drawable, public sf::Transformable
|
|
{
|
|
public:
|
|
|
|
enum class State
|
|
{
|
|
APPEARING,
|
|
ACTIVE,
|
|
TAPPED,
|
|
DYING,
|
|
|
|
DETACHED
|
|
};
|
|
|
|
explicit NoteSprite();
|
|
virtual ~NoteSprite() = 0;
|
|
|
|
virtual void update() = 0;
|
|
|
|
virtual void attach() noexcept final;
|
|
virtual void detach() noexcept final;
|
|
|
|
virtual void initState(State nextState) noexcept final;
|
|
|
|
protected:
|
|
State _state;
|
|
bool _attached;
|
|
};
|
|
|
|
#endif // NOTESPRITE_H
|