Basic guest list
This commit is contained in:
29
scenes/main/main.gd
Normal file
29
scenes/main/main.gd
Normal file
@@ -0,0 +1,29 @@
|
||||
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 _on_guest_list_mouse_entered() -> void:
|
||||
animation_player.play("guest_list_up")
|
||||
|
||||
|
||||
func _on_guest_list_mouse_exited() -> void:
|
||||
animation_player.play("guest_list_down")
|
||||
Reference in New Issue
Block a user