project-kyoku/modes/classicmode/game/classicnote.cpp

26 lines
536 B
C++
Raw Normal View History

#include "classicnote.h"
2021-09-28 05:48:06 +02:00
ClassicNote::ClassicNote(NoteInitializer &&init) :
Note(init.perfect_offset),
_evaluator(init.intervals, _perfect_offset),
2021-09-28 05:48:06 +02:00
_state(State::NONE),
_context(init.context)
{}
bool ClassicNote::isActive(const microsec& offset) const
{
return _evaluator.isActive(offset)
&& _state != State::DYING;
}
bool ClassicNote::isInGame() const
{
return _state == State::FLYING
|| _state == State::DYING;
}
bool ClassicNote::shouldRemove() const
{
return _state == State::DEAD;
}