Fix: disable ESCGame inputs until signal room_ready is emitted (#582)

* Fix: disable ESCGame inputs until signal room_ready is emitted
* fix: add a new function to use in _input() to check for inputs

* Apply suggestions from code review
Co-authored-by: balloonpopper <5151242+balloonpopper@users.noreply.github.com>
Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca>
This commit is contained in:
Julian Murgia authored and GitHub committed 2022-04-30 20:10:14 +02:00
1 parent 0414833c6d
commit 8a58aa7efc
4 files changed
+32 -5

No files matched your search

+4 -4
View File
@@ -97,10 +97,10 @@ func _exit_tree():
func _input(event: InputEvent) -> void:
if escoria.main.current_scene and escoria.main.current_scene.game:
if event is InputEventMouseMotion:
escoria.main.current_scene.game. \
update_tooltip_following_mouse_position(event.position)
if escoria.is_ready_for_inputs():
if event is InputEventMouseMotion:
escoria.main.current_scene.game. \
update_tooltip_following_mouse_position(event.position)
# https://github.com/godotengine/godot-demo-projects/blob/3.4-585455e/misc/joypads/joypads.gd