aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Particle.hpp
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-01 19:10:24 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-01 19:10:24 +0200
commitbd24f87e18bef29679023ee9a60028f2afdbb470 (patch)
treeaa17d05db8ba6d5f959e676aa2c51c67743108b3 /src/crepe/Particle.hpp
parenta78f7bbfcdabad9550afe22f615b973b92cb074f (diff)
particle POC
Diffstat (limited to 'src/crepe/Particle.hpp')
-rw-r--r--src/crepe/Particle.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/crepe/Particle.hpp b/src/crepe/Particle.hpp
new file mode 100644
index 0000000..f8d2770
--- /dev/null
+++ b/src/crepe/Particle.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+class Particle {
+public:
+ struct Position {
+ int x;
+ int y;
+ };
+
+ Position position;
+ Position velocity;
+ float lifespan;
+
+ Particle(float lifespan, Position position, Position velocity);
+ void update(float deltaTime);
+ bool isAlive() const;
+private:
+ float timeInLife;
+};