sound effects for tile placing and breaking

This commit is contained in:
minjaesong
2023-12-03 00:14:04 +09:00
parent d145edf11d
commit cba8d90321
7 changed files with 15 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ object PickaxeCore {
dropItem(drop, x, y)
}
makeDust(tile, x, y, 9)
makeNoise(actor, tile)
}
}
// tile not busted
@@ -166,6 +167,12 @@ object PickaxeCore {
}
}
fun makeNoise(actor: ActorWithBody, tile: ItemID) {
Terrarum.audioCodex.getRandomFootstep(BlockCodex[tile].material)?.let {
actor.startAudio(it, 2.0)
}
}
fun endPrimaryUse(actor: ActorWithBody, item: GameItem?): Boolean {
item?.using = false
// reset action timer to zero