feat(core): implement room navigation, character states, save/load and settings menu
- RoomNavigator autoload: smooth camera pan between floors - Floor1 and Floor2 placeholder rooms with elevator buttons - CharacterData Resource with State enum (HEALTHY/SICK/SLEEPING/TIRED) - Character visual state feedback via ColorRect color - Main scene loads saved state on startup - SettingsMenu with music/sfx sliders and game reset - HUD settings button to open SettingsMenu Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
16
scripts/main/main.gd
Normal file
16
scripts/main/main.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
## Main — scene root: wires up RoomNavigator and restores saved character positions.
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
RoomNavigator.initialize($Camera2D)
|
||||
SaveManager.load_game()
|
||||
_apply_saved_state()
|
||||
|
||||
|
||||
func _apply_saved_state() -> void:
|
||||
for character in $Characters.get_children():
|
||||
if character is Character and character.data != null:
|
||||
var pos: Vector2 = GameState.get_character_position(character.data.id)
|
||||
if pos != Vector2.ZERO:
|
||||
character.global_position = pos
|
||||
Reference in New Issue
Block a user