From 1ddb44f5caf3e0bc93b7d19cc6e227b10e4b4c41 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Wed, 23 May 2007 21:22:43 +0000 Subject: Made text splash effects fade out. --- src/particle.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/particle.cpp') 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); -- cgit v1.2.3-60-g2f50