diff options
author | Michal <michrydz@wp.pl> | 2022-04-23 21:15:11 +0200 |
---|---|---|
committer | Michal <michrydz@wp.pl> | 2022-04-23 21:15:11 +0200 |
commit | 22b52bffbe51ade791fa50a995e0b47a9978efed (patch) | |
tree | 82af6e1207878baf27e1d71e09383fd6372a4ab1 /Spiral.h | |
parent | 38df088b80cb6c159eb9941cf6d3c0a8492e65ee (diff) | |
download | bullethell2022-22b52bffbe51ade791fa50a995e0b47a9978efed.zip bullethell2022-22b52bffbe51ade791fa50a995e0b47a9978efed.tar.gz bullethell2022-22b52bffbe51ade791fa50a995e0b47a9978efed.tar.bz2 |
Add spiral bullet
Diffstat (limited to 'Spiral.h')
-rw-r--r-- | Spiral.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 <vector> + +#include <raylib.h> + + +struct SpiralBullet +{ + using Vector = std::vector<SpiralBullet>; + 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; +}; |