Files
GGJ26/scenes/main/main.gd
minimata 59b63b0945
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 1m19s
guest review process
2026-01-31 15:10:06 +01:00

41 lines
1.1 KiB
GDScript

extends Node2D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var sfx_player: AudioStreamPlayer = $SFXPlayer
var stream_player: AudioStreamPlaybackInteractive
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
stream_player = sfx_player.get_stream_playback() as AudioStreamPlaybackInteractive
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func play_list_up_sfx() -> void:
stream_player.switch_to_clip_by_name("list_up")
func play_list_down_sfx() -> void:
stream_player.switch_to_clip_by_name("list_down")
func play_list_side_sfx() -> void:
stream_player.switch_to_clip_by_name("list_side")
func _on_guest_list_mouse_entered() -> void:
animation_player.queue("guest_list_up")
func _on_guest_list_mouse_exited() -> void:
animation_player.play_backwards("guest_list_up")
func _on_mask_list_mouse_entered() -> void:
animation_player.queue("mask_list_up")
func _on_mask_list_mouse_exited() -> void:
animation_player.play_backwards("mask_list_up")