#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,12 +1,4 @@
extends Control
func _on_root_gui_player_updated(player: Player):
func player_update(player: Player):
$EnergyInfo/Label.text = str(player.energy)
var children = $Inventory.get_children()
for child in children:
child.free()
for item in player.inventory.items:
var item_rect = TextureRect.new()
item_rect.texture = item.icon
$Inventory.add_child(item_rect)