2021-09-14 15:02:23 -04:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-27 23:48:06 -04:00
|
|
|
#include "context.h"
|
2021-09-14 15:02:23 -04:00
|
|
|
#include "core/note.h"
|
|
|
|
#include "core/precisionevaluator.h"
|
2021-09-27 23:48:06 -04:00
|
|
|
#include "initializers/noteinitializer.h"
|
2021-09-14 15:02:23 -04:00
|
|
|
|
|
|
|
class ClassicSprite;
|
|
|
|
class ClassicAnimationScenario;
|
|
|
|
|
|
|
|
class ClassicNote : public Note
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum class Grade
|
|
|
|
{
|
|
|
|
PERFECT,
|
|
|
|
GOOD,
|
|
|
|
BAD
|
|
|
|
};
|
|
|
|
|
|
|
|
enum State
|
|
|
|
{
|
|
|
|
NONE,
|
|
|
|
|
|
|
|
FLYING,
|
|
|
|
ACTIVE,
|
|
|
|
DYING,
|
|
|
|
DEAD
|
|
|
|
};
|
|
|
|
|
2021-09-27 23:48:06 -04:00
|
|
|
explicit ClassicNote(NoteInitializer&& init);
|
2021-09-14 15:02:23 -04:00
|
|
|
virtual ~ClassicNote() = default;
|
|
|
|
|
2021-09-27 23:48:06 -04:00
|
|
|
virtual bool isActive() const override final;
|
|
|
|
virtual bool isInGame() const override final;
|
|
|
|
virtual bool shouldRemove() const override final;
|
2021-09-14 15:02:23 -04:00
|
|
|
|
2021-09-27 23:48:06 -04:00
|
|
|
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;
|
2021-09-14 15:02:23 -04:00
|
|
|
|
2021-09-27 23:48:06 -04:00
|
|
|
protected:
|
2021-09-14 15:02:23 -04:00
|
|
|
const PrecisionEvaluator<Grade> _evaluator;
|
|
|
|
|
|
|
|
State _state;
|
2021-11-02 13:03:27 -04:00
|
|
|
const Context *_context;
|
2021-09-14 15:02:23 -04:00
|
|
|
};
|