]> Untitled Git - baabarian.git/blob - Scene.gd
a9d57e0a0e4dd8c9dea44379caf69985f9fe309f
[baabarian.git] / Scene.gd
1 extends Node3D
2 class_name Scene
3
4
5 func _input(event: InputEvent) -> void:
6         if event.is_action_pressed("left_click"):
7                 Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
8         elif event.is_action_pressed("ui_cancel"):
9                 if Input.mouse_mode == Input.MOUSE_MODE_VISIBLE:
10                         get_tree().quit()
11                 else:
12                         Input.mouse_mode = Input.MOUSE_MODE_VISIBLE