- project.godot with autoload configuration - Reception room with placeholder visuals - Draggable Character with DragDropComponent - Interactive flower object with bounce animation - GameState, SaveManager, AudioManager, InputManager autoloads - HUD with back button and music toggle Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
535 B
GDScript
22 lines
535 B
GDScript
## HUD — heads-up display with back button and music toggle.
|
|
extends CanvasLayer
|
|
|
|
var _music_enabled: bool = true
|
|
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
|
|
func _on_back_button_pressed() -> void:
|
|
get_tree().quit()
|
|
|
|
|
|
func _on_music_toggle_pressed() -> void:
|
|
_music_enabled = not _music_enabled
|
|
var volume: float = AudioManager.DEFAULT_MUSIC_VOLUME if _music_enabled else 0.0
|
|
AudioManager.set_music_volume(volume)
|
|
var btn: Button = get_node_or_null("MusicToggle") as Button
|
|
if btn != null:
|
|
btn.text = "♪" if _music_enabled else "✕"
|