WIP: better handling for door sequence
This commit is contained in:
parent
8b35e09f42
commit
9eafc316c5
|
|
@ -165,6 +165,7 @@ func update_state():
|
||||||
_on_context_updated()
|
_on_context_updated()
|
||||||
|
|
||||||
func reveal():
|
func reveal():
|
||||||
|
if is_exit and not State.active_save_game.is_childhood_board_complete: return
|
||||||
if not visible:
|
if not visible:
|
||||||
update_state()
|
update_state()
|
||||||
visible = true
|
visible = true
|
||||||
|
|
@ -182,10 +183,9 @@ func reveal():
|
||||||
|
|
||||||
#FIXME something was eating all my inputs, maybe I can use the more pretty pattern when I figure out the culprit
|
#FIXME something was eating all my inputs, maybe I can use the more pretty pattern when I figure out the culprit
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
print("handle input")
|
|
||||||
if not visible: return
|
if not visible: return
|
||||||
if event.is_action_pressed("collect_memento_ui"):
|
if event.is_action_pressed("collect_memento_ui"):
|
||||||
if not (is_board or is_exit):
|
if not is_board:
|
||||||
collect_memento()
|
collect_memento()
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
else:
|
else:
|
||||||
|
|
@ -208,6 +208,7 @@ func vanish():
|
||||||
func collect_memento():
|
func collect_memento():
|
||||||
Scenes.start_sequence(scene)
|
Scenes.start_sequence(scene)
|
||||||
State.leave_stage(self)
|
State.leave_stage(self)
|
||||||
|
if scene == Scenes.id.TRANSITION: vanish()
|
||||||
#get_tree().call_group("scene_actors", "play_scene", scene, collected)
|
#get_tree().call_group("scene_actors", "play_scene", scene, collected)
|
||||||
if was_skipped: scene_skipped.emit(-1)
|
if was_skipped: scene_skipped.emit(-1)
|
||||||
is_collected = true
|
is_collected = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue