Godsim/scripts/ingame_menu.gd

11 lines
326 B
GDScript3
Raw Normal View History

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
func _physics_process(delta):
2024-06-08 03:37:05 +03:00
if Input.is_action_just_pressed(name):
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