Add grab sound effect

viewport-stuff
trivernis 2 years ago
parent 0404964b84
commit 2a4820db24
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

Binary file not shown.

@ -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")
}
}

@ -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)
}

Loading…
Cancel
Save