aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Particle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/Particle.cpp')
-rw-r--r--src/crepe/Particle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crepe/Particle.cpp b/src/crepe/Particle.cpp
index 90957db..f6bbd34 100644
--- a/src/crepe/Particle.cpp
+++ b/src/crepe/Particle.cpp
@@ -1,12 +1,13 @@
#include "Particle.hpp"
+
Particle::Particle(float lifespan, Position position, Position velocity)
: lifespan(lifespan), position(position), velocity(velocity), timeInLife(0.0f) {}
void Particle::update(float deltaTime) {
timeInLife += deltaTime;
- position.x += static_cast<int>(velocity.x * deltaTime);
- position.y += static_cast<int>(velocity.y * deltaTime);
+ position.x += velocity.x * deltaTime;
+ position.y += velocity.y * deltaTime;
}
bool Particle::isAlive() const {