Set a default implementation for ESCGame._on_event_done() (#486)
This commit is contained in:
@@ -38,12 +38,6 @@ Implement methods to react to inputs.
|
||||
"""
|
||||
|
||||
func _enter_tree():
|
||||
escoria.action_manager.connect(
|
||||
"action_finished",
|
||||
self,
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
var room_selector_parent = $CanvasLayer/ui/HBoxContainer/VBoxContainer
|
||||
|
||||
if ProjectSettings.get_setting("escoria/debug/enable_room_selector") and \
|
||||
@@ -55,13 +49,6 @@ func _enter_tree():
|
||||
).instance()
|
||||
)
|
||||
|
||||
func _exit_tree():
|
||||
escoria.action_manager.disconnect(
|
||||
"action_finished",
|
||||
self,
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if escoria.main.current_scene and escoria.main.current_scene.game:
|
||||
@@ -180,11 +167,6 @@ func hide_ui():
|
||||
func show_ui():
|
||||
$CanvasLayer/ui/HBoxContainer/inventory_ui.show()
|
||||
|
||||
|
||||
func _on_event_done(event_name: String):
|
||||
escoria.action_manager.clear_current_action()
|
||||
$mouse_layer/verbs_menu.clear_tool_texture()
|
||||
|
||||
func hide_main_menu():
|
||||
if get_node(main_menu).visible:
|
||||
get_node(main_menu).hide()
|
||||
@@ -259,6 +241,10 @@ func _on_action_finished():
|
||||
$mouse_layer/verbs_menu.clear_tool_texture()
|
||||
$mouse_layer/verbs_menu.iterate_actions_cursor(0)
|
||||
|
||||
func _on_event_done(_return_code: int, _event_name: String):
|
||||
escoria.action_manager.clear_current_action()
|
||||
$mouse_layer/verbs_menu.clear_tool_texture()
|
||||
|
||||
|
||||
func _on_MenuButton_pressed() -> void:
|
||||
pause_game()
|
||||
|
||||
Reference in New Issue
Block a user