Godsim/scripts/ingame_menu.gd

11 lines
263 B
GDScript

extends Control
func _ready():
#visible = false
pass
func _physics_process(delta):
if Input.is_action_just_pressed("ingame_menu"):
self.visible = !self.visible
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE if self.visible else Input.MOUSE_MODE_CAPTURED)