diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-05-23 21:22:43 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-05-23 21:22:43 +0000 |
commit | 1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41 (patch) | |
tree | 93ee24ab1b77f3bc0b57143ab2643ea7e38f951c /src/particle.cpp | |
parent | c61786006bf7694f532c77d038fc2cfd8a44b551 (diff) | |
download | mana-1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41.tar.gz mana-1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41.tar.bz2 mana-1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41.tar.xz mana-1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41.zip |
Made text splash effects fade out.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r-- | src/particle.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/particle.cpp b/src/particle.cpp index bb28c873..579bbfc1 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -146,7 +146,6 @@ Particle::update() {
if (mInvDieDistance > 0.0f && invHypotenuse > mInvDieDistance)
{
- logger->log("killed");
mAlive = false;
}
float accFactor = invHypotenuse * mAcceleration;
@@ -179,7 +178,8 @@ Particle::update() if (mPosZ > PARTICLE_SKY || mPosZ < 0.0f)
{
- if (mBounce && fabs(mVectorZ) > mGravity * 2) {
+ if (mBounce > 0.0f)
+ {
mPosZ *= -mBounce;
mVectorX *= mBounce;
mVectorY *= mBounce;
@@ -326,6 +326,8 @@ Particle::addTextSplashEffect(std::string text, gcn::Font *font, gcn::Color colo );
newParticle->setGravity(0.1f);
newParticle->setBounce(0.5f);
+ newParticle->setLifetime(200);
+ newParticle->setFadeOut(100);
mChildParticles.push_back(newParticle);
|