updated sync line
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user