27 lines
566 B
C++
27 lines
566 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <SFML/System/Clock.hpp>
|
|
#include <SFML/Graphics/Drawable.hpp>
|
|
|
|
using microsec = sf::Int64;
|
|
|
|
class Note : public sf::Drawable
|
|
{
|
|
public:
|
|
explicit Note(microsec perfect_offset) :
|
|
_perfect_offset(perfect_offset) {}
|
|
virtual ~Note() = default;
|
|
|
|
virtual bool isActive(microsec music_offset) const = 0;
|
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const = 0;
|
|
|
|
virtual microsec offset() const
|
|
{
|
|
return _perfect_offset;
|
|
}
|
|
|
|
protected:
|
|
microsec _perfect_offset;
|
|
};
|