2021-09-14 15:02:23 -04:00
|
|
|
#pragma once
|
|
|
|
|
2021-12-02 15:39:24 -05:00
|
|
|
#include "classicmode/context.h"
|
2021-09-14 15:02:23 -04:00
|
|
|
#include "core/note.h"
|
|
|
|
#include "core/precisionevaluator.h"
|
2021-11-23 13:35:13 -05:00
|
|
|
#include "classicmode/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-11-24 13:21:30 -05:00
|
|
|
virtual ~ClassicNote() override = default;
|
2021-09-14 15:02:23 -04:00
|
|
|
|
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 draw() const override = 0;
|
2021-09-14 15:02:23 -04:00
|
|
|
|
2021-11-23 13:35:13 -05:00
|
|
|
virtual void input(PlayerInput&& inputdata) = 0;
|
|
|
|
|
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
|
|
|
};
|