2024-03-18 11:25:15 +01:00
|
|
|
#pragma once
|
|
|
|
|
2024-04-26 20:00:24 +02:00
|
|
|
#include <config.hpp>
|
2024-03-18 11:25:15 +01:00
|
|
|
#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:
|
2024-04-26 20:00:24 +02:00
|
|
|
HitObjectDrawable(TextureManager &tman, const HitObject &hitObject, const Difficulty::DifficultySettings &diff, const uint comboCount);
|
2024-03-18 11:25:15 +01:00
|
|
|
|
|
|
|
void update(const float deltaTime);
|
|
|
|
};
|