Files
Cozypaw-Hospital/scripts/systems/hud.gd
Steven Wroblewski 22f4bea670 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>
2026-04-17 10:38:29 +02:00

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 ""