sfx de minage et récolte fonctionnels #164
This commit is contained in:
@@ -33,7 +33,7 @@ func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
||||
return false
|
||||
|
||||
func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
AudioManager.play_sfx("Dig")
|
||||
|
||||
for area in zone.get_affected_areas():
|
||||
if area and area is Plant:
|
||||
harvest(area, player)
|
||||
@@ -45,5 +45,7 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
var rock_layer : RockLayer = bodies[rock_layer_id]
|
||||
|
||||
rock_layer.dig_rocks(zone.get_tiles())
|
||||
AudioManager.play_sfx("Mining")
|
||||
else : AudioManager.play_sfx("Harvest")
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user