add aphid poop sounds and plop animations

This commit is contained in:
2024-10-21 21:25:27 +10:00
parent cb39aae3fd
commit f24419a86a
22 changed files with 241 additions and 11 deletions

View File

@@ -24,6 +24,9 @@ var _advance_anim_delta_accum: float = 0
@onready var nav_agent: NavigationAgent3D = $NavigationAgent3D
@onready var ui_origin: Node3D = $UiOrigin
@onready var animation_tree: AnimationTree = $AnimationTree
@onready var animation_playback: AnimationNodeStateMachinePlayback = (
animation_tree.get("parameters/playback")
)
@onready var anim_advance_indicator: VisualInstance3D = $AnimAdvanceIndicator
@onready var visibility_notifier: VisibleOnScreenNotifier3D = (
$VisibleOnScreenNotifier3D

View File

@@ -87,6 +87,9 @@ func _handle_honeydew_spawn(delta: float) -> void:
new_honeydew.global_position = global_position + new_pos
_put_honeydew(new_honeydew)
audio_player.play_sound(SoundManager.aphid_poop())
animation_playback.travel("plop")
_set_spawn_timer()

View File

@@ -146,6 +146,7 @@ func _pick_up() -> void:
_get_nth_pile_pos(_carrying_items.size() - 1)
).tween_finished
audio_player.play_sound(SoundManager.pop())
_unit.animation_playback.travel("plop_down")
await get_tree().create_timer(_pickup_interval).timeout
var nearest := _find_nearest(_nearby_items.values())
@@ -167,6 +168,7 @@ func _deposit() -> void:
return
var item := _carrying_items.pop_back() as Honeydew
_unit.animation_playback.travel("plop_up")
audio_player.play_sound(SoundManager.swoosh())
await item.start_tweening(_unit.anthill.global_position).tween_finished