diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-02-20 00:19:52 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-20 08:35:25 -0700 |
commit | b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9 (patch) | |
tree | b7583428f7462c5a6711dfa7d92b43076ea8f29b /src/particle.cpp | |
parent | 00bbc2186302fe4365f08903a209e03bb8feb4c5 (diff) | |
download | mana-b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9.tar.gz mana-b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9.tar.bz2 mana-b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9.tar.xz mana-b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9.zip |
Added a pickup notification as particle effect. Also make a ui option to enable/disable this effect (default is off) and another option to disable the pickup notification in the chat log (default is on).
Diffstat (limited to 'src/particle.cpp')
-rw-r--r-- | src/particle.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/particle.cpp b/src/particle.cpp index 9510573f..8bc764ba 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -327,10 +327,10 @@ Particle* Particle::addEffect(const std::string &particleEffectFile, Particle *Particle::addTextSplashEffect(const std::string &text, int colorR, int colorG, int colorB, - gcn::Font *font, int x, int y) + gcn::Font *font, int x, int y, bool outline) { Particle *newParticle = new TextParticle(mMap, text, colorR, colorG, colorB, - font); + font, outline); newParticle->moveTo(x, y); newParticle->setVelocity(((rand() % 100) - 50) / 200.0f, // X ((rand() % 100) - 50) / 200.0f, // Y @@ -347,9 +347,12 @@ Particle *Particle::addTextSplashEffect(const std::string &text, Particle *Particle::addTextRiseFadeOutEffect(const std::string &text, gcn::Font *font, - int x, int y) + int x, int y, + int colorR, int colorG, + int colorB, bool outline) { - Particle *newParticle = new TextParticle(mMap, text, 255, 255, 255, font); + Particle *newParticle = new TextParticle(mMap, text, colorR, colorG, colorB, + font, outline); newParticle->moveTo(x, y); newParticle->setVelocity(0.0f, 0.0f, 0.5f); newParticle->setGravity(0.0015f); |