#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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user