feat(sfx): wire character pickup/tap/place SFX to AudioManager
This commit is contained in:
@@ -187,6 +187,7 @@ func _handle_outfit_tap() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _on_drag_picked_up(pos: Vector2) -> void:
|
func _on_drag_picked_up(pos: Vector2) -> void:
|
||||||
|
AudioManager.play_sfx("character_pickup")
|
||||||
_is_held = true
|
_is_held = true
|
||||||
_drag_start_position = pos
|
_drag_start_position = pos
|
||||||
set_animation_state("held")
|
set_animation_state("held")
|
||||||
@@ -197,9 +198,11 @@ func _on_drag_released(pos: Vector2) -> void:
|
|||||||
_is_held = false
|
_is_held = false
|
||||||
var drag_distance: float = pos.distance_to(_drag_start_position)
|
var drag_distance: float = pos.distance_to(_drag_start_position)
|
||||||
if drag_distance < _TAP_THRESHOLD:
|
if drag_distance < _TAP_THRESHOLD:
|
||||||
|
AudioManager.play_sfx("character_tap")
|
||||||
set_animation_state("idle")
|
set_animation_state("idle")
|
||||||
_handle_outfit_tap()
|
_handle_outfit_tap()
|
||||||
return
|
return
|
||||||
|
AudioManager.play_sfx("character_place")
|
||||||
set_animation_state("idle")
|
set_animation_state("idle")
|
||||||
if data == null or data.id.is_empty():
|
if data == null or data.id.is_empty():
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user