2021-06-07 14:19:58 -04:00
|
|
|
#pragma once
|
|
|
|
|
2021-07-22 13:33:33 -04:00
|
|
|
#include "game/inputtype.h"
|
2021-06-23 15:18:33 -04:00
|
|
|
|
|
|
|
class Note
|
2021-06-07 14:19:58 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit Note(microsec perfect_offset) :
|
|
|
|
_perfect_offset(perfect_offset) {}
|
2021-06-09 14:08:58 -04:00
|
|
|
virtual ~Note() = default;
|
2021-06-07 14:19:58 -04:00
|
|
|
|
2021-06-24 14:04:09 -04:00
|
|
|
virtual bool isActive() const = 0;
|
2021-06-11 12:58:44 -04:00
|
|
|
virtual void update(const microsec& music_offset) = 0;
|
2021-06-23 15:18:33 -04:00
|
|
|
virtual void input(PlayerInput&& inputdata) = 0;
|
|
|
|
virtual void draw() const = 0;
|
2021-06-08 14:32:36 -04:00
|
|
|
|
2021-06-21 15:10:50 -04:00
|
|
|
virtual void putToGame(const microsec &offset) = 0;
|
2021-06-24 14:04:09 -04:00
|
|
|
virtual bool isInGame() const = 0;
|
2021-07-19 13:59:23 -04:00
|
|
|
virtual bool shouldRemove() const = 0;
|
2021-06-21 15:10:50 -04:00
|
|
|
|
|
|
|
microsec offset() const
|
2021-06-08 14:32:36 -04:00
|
|
|
{
|
|
|
|
return _perfect_offset;
|
|
|
|
}
|
|
|
|
|
2021-06-07 14:19:58 -04:00
|
|
|
protected:
|
|
|
|
microsec _perfect_offset;
|
|
|
|
};
|