diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-12 16:43:49 -0400 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-12 16:43:49 -0400 |
| commit | 4c0869841d9ee6f8cc567b3e9eb2249193fc9f83 (patch) | |
| tree | ff24074432b0178516bb7e2c43e87e8a9d72cadc /src/components.cpp | |
| parent | 1a392a79b0491c5acc766705698191ed2ed6c2e6 (diff) | |
| download | therapy-4c0869841d9ee6f8cc567b3e9eb2249193fc9f83.tar.gz therapy-4c0869841d9ee6f8cc567b3e9eb2249193fc9f83.tar.bz2 therapy-4c0869841d9ee6f8cc567b3e9eb2249193fc9f83.zip | |
Play a sound when you jump
Diffstat (limited to 'src/components.cpp')
| -rw-r--r-- | src/components.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
| diff --git a/src/components.cpp b/src/components.cpp index e2eb2ed..941d02e 100644 --- a/src/components.cpp +++ b/src/components.cpp | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include "components.h" | 1 | #include "components.h" |
| 2 | #include "game.h" | 2 | #include "game.h" |
| 3 | #include "muxer.h" | ||
| 3 | 4 | ||
| 4 | // User movement component | 5 | // User movement component |
| 5 | 6 | ||
| @@ -215,6 +216,8 @@ void PlayerPhysicsComponent::receive(Game&, Entity& entity, const Message& msg) | |||
| 215 | velocity.second = 0.0; | 216 | velocity.second = 0.0; |
| 216 | } else if (msg.type == Message::Type::jump) | 217 | } else if (msg.type == Message::Type::jump) |
| 217 | { | 218 | { |
| 219 | playSound("../res/Randomize87.wav"); | ||
| 220 | |||
| 218 | velocity.second = jump_velocity; | 221 | velocity.second = jump_velocity; |
| 219 | accel.second = jump_gravity; | 222 | accel.second = jump_gravity; |
| 220 | } else if (msg.type == Message::Type::stopJump) | 223 | } else if (msg.type == Message::Type::stopJump) |
