project-kyoku/modes/classicmode/editor/mockclassicnote.h

51 lines
1.1 KiB
C
Raw Normal View History

#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;
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;
};