diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-23 23:19:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-23 23:19:30 +0300 |
commit | 91075015ad4b5bd576c1a5668a11ea0227dd6bd1 (patch) | |
tree | 181df7013e6bfdd41cad4f2e9f18ad8944b79d04 /src/resources/iteminfo.cpp | |
parent | 66f7df70fb03d487ae0c667adec3d5ad6e11721e (diff) | |
download | plus-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.gz plus-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.bz2 plus-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.tar.xz plus-91075015ad4b5bd576c1a5668a11ea0227dd6bd1.zip |
add support for attacksky and attackwater actions.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 4b85beb64..d788613bf 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -49,6 +49,8 @@ ItemInfo::ItemInfo() : mIsRemoveSprites(false), mSpriteToItemReplaceList(), mAttackAction(SpriteAction::INVALID), + mSkyAttackAction(SpriteAction::INVALID), + mWaterAttackAction(SpriteAction::INVALID), mAttackRange(0), mMissileParticle(), mAnimationFiles(), @@ -112,6 +114,22 @@ void ItemInfo::setAttackAction(const std::string &attackAction) mAttackAction = attackAction; } +void ItemInfo::setSkyAttackAction(const std::string &attackAction) +{ + if (attackAction.empty()) + mSkyAttackAction = SpriteAction::ATTACKSKY; + else + mSkyAttackAction = attackAction; +} + +void ItemInfo::setWaterAttackAction(const std::string &attackAction) +{ + if (attackAction.empty()) + mWaterAttackAction = SpriteAction::ATTACKWATER; + else + mWaterAttackAction = attackAction; +} + void ItemInfo::addSound(const SoundEvent event, const std::string &filename, const int delay) { |