You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
project-kyoku/notesprites/notesprite.h

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