52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <array>
|
|
|
|
#include "core/note.h"
|
|
#include "initializers/mockarrownoteinitializer.h"
|
|
|
|
class ClassicSprite;
|
|
class ClassicAnimationScenario;
|
|
|
|
class MockClassicNote : public Note
|
|
{
|
|
public:
|
|
|
|
enum State
|
|
{
|
|
NONE,
|
|
|
|
FLYING,
|
|
DYING,
|
|
DEAD
|
|
};
|
|
|
|
explicit MockClassicNote(MockArrowNoteInitializer&& init);
|
|
virtual ~MockClassicNote() override = default;
|
|
|
|
virtual bool isActive(const microsec& offset) const override final;
|
|
virtual bool isInGame() const override final;
|
|
virtual bool shouldRemove() const override final;
|
|
|
|
virtual void putToGame(const microsec &music_offset) override final;
|
|
virtual void update(const microsec &music_offset) override final;
|
|
virtual void draw() const 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;
|
|
};
|