project-kyoku/notesprites/notesprite.h

37 lines
633 B
C
Raw Normal View History

2021-04-18 17:44:09 -04:00
#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