diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-04-16 09:19:56 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-10-09 17:39:20 +0200 |
commit | b376d0e30fcb0c1de2aa35807419129e7dd5da17 (patch) | |
tree | 4fe3175de8d3a5acf64570f720241d1865f0d00d /src/being.cpp | |
parent | 879455af96bc36ac6a9841f385d6b538aa683939 (diff) | |
download | mana-add-sound-events.tar.gz mana-add-sound-events.tar.bz2 mana-add-sound-events.tar.xz mana-add-sound-events.zip |
Added several sound events and support for spawn animationadd-sound-events
- Added "miss" as alias for "strike" (closes #68)
- Added "move", "sit" and "spawn" monster sounds
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index 5e869662..c0f48871 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -583,12 +583,16 @@ void Being::setAction(Action action, int attackId) switch (action) { case MOVE: + sound.playSfx(mInfo->getSound(SoundEvent::MOVE), + getPixelX(), getPixelY()); currentAction = SpriteAction::MOVE; // Note: When adding a run action, // Differentiate walk and run with action name, // while using only the ACTION_MOVE. break; case SIT: + sound.playSfx(mInfo->getSound(SoundEvent::SIT), + getPixelX(), getPixelY()); currentAction = SpriteAction::SIT; break; case ATTACK: @@ -635,6 +639,10 @@ void Being::setAction(Action action, int attackId) case STAND: currentAction = SpriteAction::STAND; break; + case SPAWN: + sound.playSfx(mInfo->getSound(SoundEvent::SPAWN), + getPixelX(), getPixelY()); + currentAction = SpriteAction::SPAWN; } if (currentAction != SpriteAction::INVALID) |