rewired signals and added savemanager and resource saving
This commit is contained in:
parent
0f5045dc22
commit
f694d5c4f8
13 changed files with 138 additions and 87 deletions
|
|
@ -19,7 +19,7 @@ func _process(delta) -> void:
|
|||
save_timer = 0.0
|
||||
|
||||
# Save the game
|
||||
SaveGame.save()
|
||||
SaveManager.save_game()
|
||||
|
||||
save_button_held_down = false
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ func _on_close_button_pressed() -> void:
|
|||
pass # Replace with function body.
|
||||
|
||||
func _update_monster_list() -> void:
|
||||
for i in SaveData.monsters.size():
|
||||
var monster = SaveData.monsters[i]
|
||||
for i in SaveManager.current_save.party.size():
|
||||
var monster = SaveManager.current_save.party[i]
|
||||
var entry = monster_list_entry.instantiate()
|
||||
|
||||
# populate the new entry
|
||||
entry.populate(SaveData.monsters[i])
|
||||
entry.populate(SaveManager.current_save.party[i])
|
||||
|
||||
# add it to the list
|
||||
monster_list_entry_container.add_child(entry)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ signal on_game_continued
|
|||
|
||||
# On ready, check which buttons to show
|
||||
func _ready() -> void:
|
||||
if SaveGame.savegame_exists():
|
||||
if SaveManager.save_exists():
|
||||
%ContinueGameButton.visible = true
|
||||
%NewGameButton.visible = false
|
||||
|
||||
|
|
|
|||
2
ui/ui.gd
2
ui/ui.gd
|
|
@ -34,7 +34,7 @@ func _on_ingame_controls_menu_button_clicked() -> void:
|
|||
ingame_menu.visible = true
|
||||
|
||||
# Updates the whole UI
|
||||
func _update_ui() -> void:
|
||||
func update() -> void:
|
||||
# Updating the player info
|
||||
ingame_menu._update_player_info()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue