#pragma once

#include <render/sprite/atlas.h>
#include <render/fx/effect.h>
#include "defs.hpp"

namespace game {

class Note
{
private:
    NoteManager *manager;
    float currentTime;
    float effectTime;
    float appearTime;
    int effectType = 0;

    vec2f moveVector;

    render::sprite::icon icon, placeholderIcon, longIcon, arrowIcon;
    render::fx::effect *effect;
public:
    const noteInfo *info;
    bool active = false;

    Note(NoteManager *manager, const noteInfo *info);
    ~Note();

    void Hit();
    void Miss();

    void Update() noexcept;
    void RenderEffects() noexcept;
    void RenderPlaceholder() noexcept;
    void Render() noexcept;
};

}
