updated sync line

This commit is contained in:
2025-12-22 17:18:29 +01:00
parent a729dc089e
commit d3ca238a51
2 changed files with 110 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#pragma once
#include <SDL3/SDL.h>
#include <vector>
enum class SyncState {
Idle,
LeftReady,
@ -21,13 +23,27 @@ public:
void Render(SDL_Renderer* renderer);
private:
struct SyncParticle {
float y;
float speed;
float alpha;
};
SDL_FRect m_rect{};
SyncState m_state;
float m_flashTimer;
float m_time;
float m_pulseTime{0.0f};
float m_spawnAcc{0.0f};
std::vector<SyncParticle> m_particles;
static constexpr float FLASH_DURATION = 0.15f;
static constexpr size_t MAX_PARTICLES = 64;
void SpawnParticle();
void SpawnBurst(int count);
SDL_Color GetBaseColor() const;
};