feat(audio): wire SFX into HoldableItem and OutfitItem
This commit is contained in:
@@ -24,6 +24,7 @@ func _ready() -> void:
|
|||||||
func _on_drag_picked_up(_pos: Vector2) -> void:
|
func _on_drag_picked_up(_pos: Vector2) -> void:
|
||||||
if is_in_hand_slot():
|
if is_in_hand_slot():
|
||||||
_detach_from_hand_slot()
|
_detach_from_hand_slot()
|
||||||
|
AudioManager.play_sfx("item_drag_start")
|
||||||
item_picked_up.emit(self)
|
item_picked_up.emit(self)
|
||||||
|
|
||||||
|
|
||||||
@@ -35,6 +36,9 @@ func _on_drag_released(_pos: Vector2) -> void:
|
|||||||
var character: Character = result[0] as Character
|
var character: Character = result[0] as Character
|
||||||
var hand: String = result[1] as String
|
var hand: String = result[1] as String
|
||||||
character.attach_item(hand, self)
|
character.attach_item(hand, self)
|
||||||
|
AudioManager.play_sfx("item_drop_hand")
|
||||||
|
else:
|
||||||
|
AudioManager.play_sfx("item_drop_floor")
|
||||||
item_placed.emit(self)
|
item_placed.emit(self)
|
||||||
|
|
||||||
|
|
||||||
@@ -46,6 +50,7 @@ func _try_return_to_chest() -> bool:
|
|||||||
var chest: RoomChest = home_chest as RoomChest
|
var chest: RoomChest = home_chest as RoomChest
|
||||||
if chest == null:
|
if chest == null:
|
||||||
return false
|
return false
|
||||||
|
AudioManager.play_sfx("item_return_chest")
|
||||||
chest.receive_item(self)
|
chest.receive_item(self)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ func _on_drag_released(_pos: Vector2) -> void:
|
|||||||
var character: Character = _find_nearest_character()
|
var character: Character = _find_nearest_character()
|
||||||
if character != null:
|
if character != null:
|
||||||
character.apply_outfit_item(outfit_layer, item_id, outfit_sprite, self)
|
character.apply_outfit_item(outfit_layer, item_id, outfit_sprite, self)
|
||||||
|
AudioManager.play_sfx("item_drop_outfit")
|
||||||
return
|
return
|
||||||
super._on_drag_released(_pos)
|
super._on_drag_released(_pos)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user