#13 suite du developpement d'inventaire avec le rajout des ItemObjects, description sur le GUI, items d'exemple et corrections mineures

This commit was merged in pull request #35.
This commit is contained in:
2025-08-18 16:05:37 +02:00
parent d2742231e6
commit a91ca5f7f1
43 changed files with 755 additions and 90 deletions

View File

@@ -1,15 +1,24 @@
extends Control
class_name RootGui
signal player_stats_updated(player : Player)
signal game_click
signal day_pass_pressed
signal day_pass_proceed
signal day_pass_finished
func _on_player_player_stats_updated(player:Player):
emit_signal("player_stats_updated", player)
func _on_player_updated(player:Player):
$MarginContainer/PlayerInfo.player_update(player)
%AvailableActions/GetItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() == 0
%AvailableActions/SwapItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() > 0
%AvailableActions/DropItem.visible = player.inventory.lenght() > 0
%ItemInfo.visible = player.inventory.lenght() > 0
if player.inventory.lenght() > 0:
var item : Item = player.inventory.get_item()
%ItemIcon.texture = item.icon
%ItemName.text = item.name
%ItemDesc.text = item.description
func _on_planet_planet_stats_updated(day:int):
$MarginContainer/DayCount.text = "Day " + str(day)