osuplusplus/include/HitObjectDrawable.hpp

38 lines
792 B
C++

#pragma once
#include <config.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 Difficulty::DifficultySettings &diff, const uint comboCount);
void update(const float deltaTime);
};