44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "arrowelement.h"
|
|
#include "classicmode/classicnote.h"
|
|
|
|
#include "classicmode/arrownoteinitializer.h"
|
|
|
|
class HoldManager;
|
|
|
|
class ClassicArrowNote : public ClassicNote
|
|
{
|
|
public:
|
|
enum class Grade
|
|
{
|
|
PERFECT,
|
|
GOOD,
|
|
BAD
|
|
};
|
|
|
|
explicit ClassicArrowNote(ArrowNoteInitializer&& init, const std::shared_ptr<HoldManager>& hold_manager);
|
|
virtual ~ClassicArrowNote() = default;
|
|
|
|
virtual bool isActive(const kku::microsec& offset) const override;
|
|
virtual void update(const kku::microsec &music_offset) override;
|
|
virtual void input(kku::GameEvent&& input) override;
|
|
|
|
virtual void display(const ClassicGraphicsManager * const manager) const override;
|
|
virtual void setGraphics(ClassicGraphicsManager * const manager, kku::TimeRange&& range) override;
|
|
virtual void removeGraphics(ClassicGraphicsManager * const manager) override;
|
|
|
|
bool allElementsPressed() const;
|
|
bool isPressedAs(kku::SystemEvent::Key::Code key) const;
|
|
inline bool isHold() const;
|
|
|
|
private:
|
|
const kku::PrecisionEvaluator<Grade> _evaluator;
|
|
const std::shared_ptr<HoldManager> _hold_manager;
|
|
|
|
std::vector<ArrowElement> _elements;
|
|
bool _is_hold;
|
|
};
|
|
|
|
using ArrowElements = std::vector<ArrowElement>;
|