summaryrefslogtreecommitdiffhomepage
path: root/Bullets.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-17 15:04:55 +0200
committerAki <please@ignore.pl>2022-04-17 15:05:31 +0200
commit162ab6e923cf0c065449cfc248102b5b92fac8a7 (patch)
tree751b8c57dc0309d42ee5c524f43780021ac53acc /Bullets.h
parent85119293fe4f6814d44e8ee3f182c40876829128 (diff)
downloadbullethell2022-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.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bullets.h b/Bullets.h
index 7778a9c..4a77100 100644
--- a/Bullets.h
+++ b/Bullets.h
@@ -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;
};