Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Felis 256cd4f1f3 Fixed PickupItem scenes to spawn their item child scenes. 2024-08-15 21:13:09 +02:00
Martin Felis b8cb77f613 Reactivated pickup messages. 2024-08-15 21:10:38 +02:00
3 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,7 @@ func _on_player_trigger_message(message):
%MessagesContainer/MessageTextEdit.text = message
%MessagesContainer/MessageTimer.start(1)
%MessagesContainer.visible = true
print(message)
func _unhandled_key_input(event:InputEvent):

View File

@ -11,12 +11,12 @@ var editor_child_scene:Node3D = null
if value != item:
item = value
if not Engine.is_editor_hint():
return
if editor_child_scene != null:
editor_child_scene.queue_free()
if not Engine.is_editor_hint():
return
editor_child_scene = item.scene.instantiate()
add_child(editor_child_scene)
editor_child_scene.owner = self

View File

@ -18,6 +18,8 @@ func _ready():
var recipe:Recipe = load(resource_file) as Recipe
_all_recipes.append(recipe)
player.connect("trigger_message", ui_panels[2]._on_player_trigger_message)
set_root_ui_state(ROOT_UI_STATE.GAME)
func activate_ui_panel(ui_panel:Control):