diff --git a/assets/sounds/effects/grab.mp3 b/assets/sounds/effects/grab.mp3 new file mode 100644 index 0000000..260841a Binary files /dev/null and b/assets/sounds/effects/grab.mp3 differ diff --git a/core/src/main/kotlin/com/last/commit/audio/GameSoundEffect.kt b/core/src/main/kotlin/com/last/commit/audio/GameSoundEffect.kt index 747daff..a4ba3fb 100644 --- a/core/src/main/kotlin/com/last/commit/audio/GameSoundEffect.kt +++ b/core/src/main/kotlin/com/last/commit/audio/GameSoundEffect.kt @@ -14,5 +14,6 @@ public class GameSoundEffect(name: String): GameSound(name) { val DOOR_OPEN = GameSoundEffect("door_open.mp3") val DOOR_CLOSE = GameSoundEffect("door_close.mp3") val TIME_TRAVEL = GameSoundEffect("time_travel.mp3") + val GRAB = GameSoundEffect("grab.mp3") } } \ No newline at end of file diff --git a/core/src/main/kotlin/com/last/commit/map/Collectible.kt b/core/src/main/kotlin/com/last/commit/map/Collectible.kt index 43cc65d..d81303b 100644 --- a/core/src/main/kotlin/com/last/commit/map/Collectible.kt +++ b/core/src/main/kotlin/com/last/commit/map/Collectible.kt @@ -1,6 +1,7 @@ package com.last.commit.map import com.badlogic.gdx.math.Rectangle +import com.last.commit.audio.GameSoundEffect import Position import GameState @@ -21,6 +22,7 @@ class Collectible( override fun interact(otherCollider: Rectangle, state: GameState) { println("Interacting with item $name") + state.soundEngine.play(GameSoundEffect.GRAB) state.inventory.add(this.name) }