preventing focus drops

This commit is contained in:
betalars 2023-07-19 22:44:29 +02:00
parent 111b39c5c3
commit 4bcc1b7da5
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,6 @@ class_name Collectable_Ui
if has_stage == focused: return if has_stage == focused: return
if focused: if focused:
owner.reveal()
has_stage = true has_stage = true
collapsed = false collapsed = false
if not visible: show() if not visible: show()
@ -128,12 +127,13 @@ func _yoink_focus():
func _on_pick_button_pressed(): func _on_pick_button_pressed():
print("card collected!") print("card collected!")
if scene != null: if scene != null:
State.leave_stage(self)
get_tree().call_group("animation_player", "play_scene", scene, collected) get_tree().call_group("animation_player", "play_scene", scene, collected)
if skipped: emit_signal("scene_skipped", -1) if skipped: emit_signal("scene_skipped", -1)
collected = true collected = true
else: else:
emit_signal("open_board") emit_signal("open_board")
State.leave_stage(self)
func _on_pick_button_released(): func _on_pick_button_released():
hide() hide()