mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-26 08:17:38 -04:00
hide world forground on first frame
This commit is contained in:
parent
52588770a4
commit
1ad079704b
3 changed files with 8 additions and 22 deletions
|
@ -12,7 +12,7 @@ var _visible: bool = true
|
|||
|
||||
func _ready() -> void:
|
||||
command_events.set_mouse_mode.connect(set_mouse_mode)
|
||||
gate_events.first_frame.connect(func(): gate_started = true)
|
||||
gate_events.first_frame.connect(on_first_frame)
|
||||
gate_events.not_responding.connect(func(): set_mouse_mode(Input.MOUSE_MODE_VISIBLE))
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
@ -30,6 +30,11 @@ func _input(event: InputEvent) -> void:
|
|||
show_ui()
|
||||
|
||||
|
||||
func on_first_frame() -> void:
|
||||
gate_started = true
|
||||
hide_ui()
|
||||
|
||||
|
||||
func show_ui() -> void:
|
||||
if _visible: return
|
||||
_visible = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue