diff options
author | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-20 07:07:23 +0000 |
---|---|---|
committer | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-20 07:07:23 +0000 |
commit | 148b62c05337eaaaf3a1ead212b3792122812cee (patch) | |
tree | a56e3e20b635f7f4ab53b55887103ae711558297 /src/particle.cpp | |
parent | c322e6eac2373358c04e7bd70c8e0fc1bcfb37db (diff) | |
download | mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.gz mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.bz2 mana-148b62c05337eaaaf3a1ead212b3792122812cee.tar.xz mana-148b62c05337eaaaf3a1ead212b3792122812cee.zip |
Added monster killed xp notification effect.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r-- | src/particle.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/particle.cpp b/src/particle.cpp index 805da102..8e47fb06 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -338,6 +338,25 @@ Particle::addTextSplashEffect(std::string text, return newParticle; } +Particle* +Particle::addTextRiseFadeOutEffect(std::string text, gcn::Font *font, + int x, int y) +{ + Particle *newParticle = new TextParticle(mMap, text, 255, 255, 255, font); + newParticle->setPosition(x, y, 0); + newParticle->setVector ( 0.0f, // X vector + 0.0f, // Y vector + 0.5f // Z vector + ); + newParticle->setGravity(0.0015f); + newParticle->setLifetime(300); + newParticle->setFadeOut(50); + newParticle->setFadeIn(200); + + mChildParticles.push_back(newParticle); + + return newParticle; +} void Particle::setMap(Map *map) |