diff options
author | Aki <please@ignore.pl> | 2022-04-17 15:04:55 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-17 15:05:31 +0200 |
commit | 162ab6e923cf0c065449cfc248102b5b92fac8a7 (patch) | |
tree | 751b8c57dc0309d42ee5c524f43780021ac53acc /Bullets.h | |
parent | 85119293fe4f6814d44e8ee3f182c40876829128 (diff) | |
download | bullethell2022-162ab6e923cf0c065449cfc248102b5b92fac8a7.zip bullethell2022-162ab6e923cf0c065449cfc248102b5b92fac8a7.tar.gz bullethell2022-162ab6e923cf0c065449cfc248102b5b92fac8a7.tar.bz2 |
Separated bullet generator into class and created system for bullets
Diffstat (limited to 'Bullets.h')
-rw-r--r-- | Bullets.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -5,14 +5,26 @@ #include <raylib.h> +static constexpr float MARGIN {40}; + + struct ConstantVelocityBullet; -void update(float dt, std::vector<ConstantVelocityBullet>& bullets); +struct ConstantVelocitySystem +{ + ConstantVelocitySystem(); + explicit ConstantVelocitySystem(int reserved); + void update(float dt); + void draw(); + std::vector<ConstantVelocityBullet> m_bullets; +}; struct ConstantVelocityBullet { Vector2 position; Vector2 velocity; + float radius; + Color color; }; |