diff --git a/assets/Sounds/Jelly/squid-bounce-n.wav b/assets/Sounds/Jelly/squid-bounce-n.wav new file mode 100644 index 0000000..ca39180 Binary files /dev/null and b/assets/Sounds/Jelly/squid-bounce-n.wav differ diff --git a/include/Game/BallSystem.h b/include/Game/BallSystem.h index 32a158d..4b12453 100644 --- a/include/Game/BallSystem.h +++ b/include/Game/BallSystem.h @@ -38,6 +38,7 @@ #include "Game/EActionButton.h" #include "Game/ELifebuoyHit.h" #include "Physics/ECreateParticleSequence.h" +#include "Sound/CCollisionSound.h" namespace dd { diff --git a/src/game/Game/BallSystem.cpp b/src/game/Game/BallSystem.cpp index 04fecfb..424d7ad 100644 --- a/src/game/Game/BallSystem.cpp +++ b/src/game/Game/BallSystem.cpp @@ -50,6 +50,8 @@ void dd::Systems::BallSystem::Initialize() physics->Category = CollisionLayer::Type::Ball; physics->Mask = static_cast(CollisionLayer::Type::Pad | CollisionLayer::Type::Brick | CollisionLayer::Type::Wall | CollisionLayer::LifeBuoy); physics->Calculate = true; + auto collisionSound = m_World->AddComponent(ent); + collisionSound->FilePath = "Sounds/Jelly/squid-bounce-n.wav"; m_World->CommitEntity(ent); diff --git a/src/game/Game/LifebuoySystem.cpp b/src/game/Game/LifebuoySystem.cpp index 50ae859..13a3f1f 100644 --- a/src/game/Game/LifebuoySystem.cpp +++ b/src/game/Game/LifebuoySystem.cpp @@ -143,7 +143,7 @@ bool dd::Systems::LifebuoySystem::OnLifebuoyHit(const dd::Events::LifebuoyHit &e e.EmittingAngle = glm::half_pi(); e.Spread = 0.5f; e.NumberOfTicks = 1; - e.ParticleLifeTime = 1.f; + e.ParticleLifeTime = 2.f; e.ParticlesPerTick = 1; e.Position = transformComponent->Position; e.ScaleValues.clear();