feat(poc): implement Sprint 1 proof of concept
- 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>
This commit is contained in:
21
scripts/systems/hud.gd
Normal file
21
scripts/systems/hud.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
## 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 "✕"
|
||||
Reference in New Issue
Block a user