osuplusplus/include/HitObjectDrawable.hpp
2024-03-18 11:25:15 +01:00

38 lines
782 B
C++

#pragma once
#include <beatmaps.hpp>
#include <TextureManager.hpp>
#include <osuparser.hpp>
#include <filesystem>
#include <SFML/Graphics.hpp>
namespace fs = std::filesystem;
struct HitObjectDrawable : public sf::Drawable {
TextureManager &tman;
sf::Sprite hitCircleSprite;
sf::Sprite numberSprite;
sf::Sprite hitCircleOverlaySprite;
sf::Sprite approachCircleSprite;
HitObject hitObject;
// all in milliseconds
float fadeIn;
float preempt;
float time;
float timer;
virtual void draw(sf::RenderTarget &target, sf::RenderStates states) const;
public:
HitObjectDrawable(TextureManager &tman, const HitObject &hitObject, const DifficultySettings &diff, const uint comboCount);
void update(const float deltaTime);
};