From 22b52bffbe51ade791fa50a995e0b47a9978efed Mon Sep 17 00:00:00 2001 From: Michal Date: Sat, 23 Apr 2022 21:15:11 +0200 Subject: Add spiral bullet --- Spiral.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Spiral.h (limited to 'Spiral.h') diff --git a/Spiral.h b/Spiral.h new file mode 100644 index 0000000..064e3a7 --- /dev/null +++ b/Spiral.h @@ -0,0 +1,32 @@ +#pragma once + +#include + +#include + + +struct SpiralBullet +{ + using Vector = std::vector; + Vector2 position; + float velocity; + float angle; + float redirect; + float timer; + float redirect_time; + float redirect_decrease; + float radius; + Color color; +}; + + +struct SpiralSystem +{ + static constexpr float MARGIN {40}; + static constexpr int RESERVED {10000}; + + SpiralSystem(); + void update(float dt); + void draw(); + SpiralBullet::Vector m_bullets; +}; -- cgit v1.1