Godot Version
newest
can someone explain why it doesnt work
extends Control
func _process(delta):
testEsc()
push_error()
func _on_quit_pressed():
get_tree().quit()
func resume():
get_tree().paused = false
func pause():
get_tree().paused = true
func testEsc():
if Input.is_action_pressed("esc"):
push_error()
pause()
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
elif Input.is_action_just_pressed("esc") and get_tree().paused == true:
resume()
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _on_resume_pressed():
resume()
func _on_options_pressed():
get_tree().change_scene_to_file(“res://scenes/options ingame.tscn”)