adapted monster structure and save game
This commit is contained in:
parent
04873e3880
commit
aa4afc4c4b
22 changed files with 358 additions and 183 deletions
|
|
@ -1,7 +1,7 @@
|
|||
extends CanvasLayer
|
||||
class_name UI
|
||||
|
||||
@onready var monster_list: MarginContainer = %MonsterList
|
||||
@onready var ingame_menu: MarginContainer = %IngameMenu
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
@ -12,12 +12,15 @@ func _process(delta: float) -> void:
|
|||
pass
|
||||
|
||||
func _on_ingame_controls_menu_button_clicked() -> void:
|
||||
monster_list.visible = true
|
||||
ingame_menu.visible = true
|
||||
|
||||
# Updates the whole UI
|
||||
func _update_ui() -> void:
|
||||
# Updating the player info
|
||||
ingame_menu._update_player_info()
|
||||
|
||||
# Updating the monster list
|
||||
monster_list._update_monster_list()
|
||||
ingame_menu._update_monster_list()
|
||||
|
||||
print("UI updated")
|
||||
|
||||
|
|
@ -34,9 +37,8 @@ func _on_ingame_controls_save_timer_incremented(value) -> void:
|
|||
|
||||
func _on_ingame_controls_save_timer_reached() -> void:
|
||||
%SavePercentage.text = "Saved!"
|
||||
print("Saved Game")
|
||||
%IngameControls.disable_save_button()
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
%IngameControls.enable_save_button()
|
||||
$SaveUI.visible = false
|
||||
%SavePercentage.text = "0 % ..."
|
||||
%SavePercentage.text = "0%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue