renamed a few more members and changed some switch statements
[physics.git] / src / Entities / Particle.cpp
index 97cbafb..c978d38 100644 (file)
 
 #include "Particle.h"
 
-#include <pg/Vector2.h>
+#include <bear/Vector2.h>
+using namespace bear;
 
 
 /// ***** Constructors/Destructors *****
 
 Particle::Particle(const Vector2& pos, bool canDie)
-    : Entity(pos), canDie(canDie)
+    : Entity(pos), m_canDie(canDie)
 {
 
 }
 Particle::Particle(const Vector2& pos, float lifeTime)
-    : Entity(pos), lifeTime(lifeTime)
+    : Entity(pos), m_lifeTime(lifeTime)
 {
 
 }
@@ -41,13 +42,13 @@ Particle::~Particle()
 
 void Particle::update(float time_step)
 {
-    if(isDead)
+    if(m_isDead)
         return;
 
-    if (canDie)
+    if (m_canDie)
     {
-        lifeTime -= time_step;
-        isDead = lifeTime <= 0;
+        m_lifeTime -= time_step;
+        m_isDead = m_lifeTime <= 0;
     }
-    position += velocity * time_step;
+    m_position += m_velocity * time_step;
 }