summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-10 22:42:45 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-10 22:52:53 +0300
commitcdc8f4ad535d39adb89f238c6f9b2c68d71f6151 (patch)
treeec2ecc06c9cfb870b3a11aaec5326bf987593494 /src/statuseffect.cpp
parent4aa184df5a208c51cb0141ae6a609c60294d8323 (diff)
downloadplus-cdc8f4ad535d39adb89f238c6f9b2c68d71f6151.tar.gz
plus-cdc8f4ad535d39adb89f238c6f9b2c68d71f6151.tar.bz2
plus-cdc8f4ad535d39adb89f238c6f9b2c68d71f6151.tar.xz
plus-cdc8f4ad535d39adb89f238c6f9b2c68d71f6151.zip
Add support for permanent particle effect.s20160712
Attribute name "particle". This effect cant be played at start, if existing "start-particle" but will be played if effect continues.
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 7e89ae0f2..a53f239b2 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -39,6 +39,7 @@ StatusEffect::StatusEffect() :
mMessage(),
mSFXEffect(),
mStartParticleEffect(),
+ mParticleEffect(),
mIcon(),
mAction(),
mName(),
@@ -75,6 +76,14 @@ Particle *StatusEffect::getStartParticle() const
return particleEngine->addEffect(mStartParticleEffect, 0, 0);
}
+Particle *StatusEffect::getParticle() const
+{
+ if (!particleEngine || mParticleEffect.empty())
+ return nullptr;
+ else
+ return particleEngine->addEffect(mParticleEffect, 0, 0);
+}
+
AnimatedSprite *StatusEffect::getIcon() const
{
if (mIcon.empty())