projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
named members m_* to quite -Wshadow
[physics.git]
/
src
/
Entities
/
Particle.cpp
diff --git
a/src/Entities/Particle.cpp
b/src/Entities/Particle.cpp
index
c7626d4
..
d84ce75
100644
(file)
--- a/
src/Entities/Particle.cpp
+++ b/
src/Entities/Particle.cpp
@@
-24,12
+24,12
@@
using namespace bear;
/// ***** Constructors/Destructors *****
Particle::Particle(const Vector2& pos, bool canDie)
/// ***** 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)
{
}
Particle::Particle(const Vector2& pos, float lifeTime)
- : Entity(pos), lifeTime(lifeTime)
+ : Entity(pos),
m_
lifeTime(lifeTime)
{
}
{
}
@@
-42,13
+42,13
@@
Particle::~Particle()
void Particle::update(float time_step)
{
void Particle::update(float time_step)
{
- if(isDead)
+ if(
m_
isDead)
return;
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;
}
}
position += velocity * time_step;
}