diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-05 21:33:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-05 21:33:44 +0300 |
commit | e6d7fca349c28eaf98d643325dc99dd9d3a53568 (patch) | |
tree | 84ac779d45a0094dde45d9a05039db41d568adbf /src/effectmanager.cpp | |
parent | a48638c5e9bfc04876661ea938eed4a3ab9e5c42 (diff) | |
download | mv-e6d7fca349c28eaf98d643325dc99dd9d3a53568.tar.gz mv-e6d7fca349c28eaf98d643325dc99dd9d3a53568.tar.bz2 mv-e6d7fca349c28eaf98d643325dc99dd9d3a53568.tar.xz mv-e6d7fca349c28eaf98d643325dc99dd9d3a53568.zip |
first part for adding mobs particle effects.
Based on mana commit b35aef2d924f03d85eb44a2465be5a745444eafd
by Yohann Ferreira
Diffstat (limited to 'src/effectmanager.cpp')
-rw-r--r-- | src/effectmanager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index 42c6d471d..f80a16972 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -61,7 +61,8 @@ EffectManager::~EffectManager() { } -bool EffectManager::trigger(const int id, Being *const being) +bool EffectManager::trigger(const int id, Being *const being, + const int rotation) { if (!being || !particleEngine) return false; @@ -76,7 +77,7 @@ bool EffectManager::trigger(const int id, Being *const being) if (!(*i).GFX.empty()) { Particle *const selfFX = particleEngine->addEffect( - (*i).GFX, 0, 0); + (*i).GFX, 0, 0, rotation); being->controlParticle(selfFX); } if (!(*i).SFX.empty()) @@ -87,7 +88,8 @@ bool EffectManager::trigger(const int id, Being *const being) return rValue; } -bool EffectManager::trigger(const int id, const int x, const int y) +bool EffectManager::trigger(const int id, const int x, const int y, + const int rotation) { if (!particleEngine) return false; @@ -100,7 +102,7 @@ bool EffectManager::trigger(const int id, const int x, const int y) { rValue = true; if (!(*i).GFX.empty() && particleEngine) - particleEngine->addEffect((*i).GFX, x, y); + particleEngine->addEffect((*i).GFX, x, y, rotation); if (!(*i).SFX.empty()) sound.playSfx((*i).SFX); break; |