forked from NaiJi/project-kyoku
34 lines
727 B
C++
34 lines
727 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <SFML/System/Clock.hpp>
|
|
#include <SFML/Graphics/Drawable.hpp>
|
|
|
|
#include "inputtype.h"
|
|
|
|
using microsec = sf::Int64;
|
|
|
|
class Note
|
|
{
|
|
public:
|
|
explicit Note(microsec perfect_offset) :
|
|
_perfect_offset(perfect_offset) {}
|
|
virtual ~Note() = default;
|
|
|
|
virtual bool isActive(const microsec& music_offset) const = 0;
|
|
virtual void update(const microsec& music_offset) = 0;
|
|
virtual void input(PlayerInput&& inputdata) = 0;
|
|
virtual void draw() const = 0;
|
|
|
|
virtual void putToGame(const microsec &offset) = 0;
|
|
virtual bool isExpired() const = 0;
|
|
|
|
microsec offset() const
|
|
{
|
|
return _perfect_offset;
|
|
}
|
|
|
|
protected:
|
|
microsec _perfect_offset;
|
|
};
|