2024-05-31 02:41:00 +03:00
|
|
|
extends Control
|
|
|
|
|
2024-06-08 03:37:05 +03:00
|
|
|
@onready var God = get_tree().root.get_node("world/God")
|
2024-05-31 22:46:56 +03:00
|
|
|
|
2024-05-31 02:41:00 +03:00
|
|
|
func _physics_process(delta):
|
2024-06-08 03:37:05 +03:00
|
|
|
if Input.is_action_just_pressed(name):
|
2024-05-31 02:41:00 +03:00
|
|
|
self.visible = !self.visible
|
|
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE if self.visible else Input.MOUSE_MODE_CAPTURED)
|
2024-06-08 03:37:05 +03:00
|
|
|
God.get_node("Camera/eye").enabled = !self.visible
|
|
|
|
|