2021-11-23 13:35:13 -05:00
|
|
|
#pragma once
|
|
|
|
|
2021-11-24 13:21:30 -05:00
|
|
|
#include <memory>
|
|
|
|
#include <array>
|
|
|
|
|
2021-11-23 13:35:13 -05:00
|
|
|
#include "core/note.h"
|
|
|
|
#include "initializers/mockarrownoteinitializer.h"
|
|
|
|
|
2021-11-24 13:21:30 -05:00
|
|
|
class ClassicSprite;
|
|
|
|
class ClassicAnimationScenario;
|
|
|
|
|
2021-11-23 13:35:13 -05:00
|
|
|
class MockClassicNote : public Note
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum State
|
|
|
|
{
|
|
|
|
NONE,
|
|
|
|
|
|
|
|
FLYING,
|
|
|
|
DYING,
|
|
|
|
DEAD
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit MockClassicNote(MockArrowNoteInitializer&& init);
|
2021-11-24 13:21:30 -05:00
|
|
|
virtual ~MockClassicNote() override = default;
|
2021-11-23 13:35:13 -05:00
|
|
|
|
2021-12-08 13:00:47 -05:00
|
|
|
virtual bool isActive(const microsec& offset) const override final;
|
2021-11-23 13:35:13 -05:00
|
|
|
virtual bool isInGame() const override final;
|
|
|
|
virtual bool shouldRemove() const override final;
|
|
|
|
|
2021-11-24 13:21:30 -05:00
|
|
|
virtual void putToGame(const microsec &music_offset) override final;
|
|
|
|
virtual void update(const microsec &music_offset) override final;
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct MockElement
|
|
|
|
{
|
|
|
|
std::shared_ptr<ClassicSprite> sprite;
|
|
|
|
std::array<std::shared_ptr<ClassicAnimationScenario>, 4> animations;
|
|
|
|
Type type = Type::NONE;
|
|
|
|
|
|
|
|
Coordinates coordinates;
|
|
|
|
std::vector<Coordinates> falling_curve_interpolation;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<MockElement> _elements;
|
|
|
|
|
|
|
|
State _state;
|
|
|
|
const Context *_context;
|
2021-11-23 13:35:13 -05:00
|
|
|
};
|