50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "context.h"
|
|
#include "core/note.h"
|
|
#include "core/precisionevaluator.h"
|
|
#include "initializers/noteinitializer.h"
|
|
|
|
class ClassicSprite;
|
|
class ClassicAnimationScenario;
|
|
|
|
class ClassicNote : public Note
|
|
{
|
|
public:
|
|
|
|
enum class Grade
|
|
{
|
|
PERFECT,
|
|
GOOD,
|
|
BAD
|
|
};
|
|
|
|
enum State
|
|
{
|
|
NONE,
|
|
|
|
FLYING,
|
|
ACTIVE,
|
|
DYING,
|
|
DEAD
|
|
};
|
|
|
|
explicit ClassicNote(NoteInitializer&& init);
|
|
virtual ~ClassicNote() = default;
|
|
|
|
virtual bool isActive() const override final;
|
|
virtual bool isInGame() const override final;
|
|
virtual bool shouldRemove() const override final;
|
|
|
|
virtual void putToGame(const microsec &music_offset) override = 0;
|
|
virtual void update(const microsec &music_offset) override = 0;
|
|
virtual void input(PlayerInput&& inputdata) override = 0;
|
|
virtual void draw() const override = 0;
|
|
|
|
protected:
|
|
const PrecisionEvaluator<Grade> _evaluator;
|
|
|
|
State _state;
|
|
std::shared_ptr<Context> _context;
|
|
};
|