2023-01-24 13:33:37 -07:00
|
|
|
extends Control
|
|
|
|
|
2023-01-26 13:23:13 -07:00
|
|
|
|
|
|
|
|
2023-01-24 13:33:37 -07:00
|
|
|
func _ready():
|
2023-01-26 13:23:13 -07:00
|
|
|
if Global.playingGame == true:
|
|
|
|
$Button.text = "RESUME"
|
2023-01-24 13:33:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _on_button_pressed():
|
2023-01-26 13:23:13 -07:00
|
|
|
if Global.playingGame == false:
|
|
|
|
get_tree().change_scene_to_file("res://scenes/playground.tscn")
|
|
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
|
|
|
elif Global.playingGame == true:
|
|
|
|
self.queue_free()
|
|
|
|
Global.menuOpen = false
|
|
|
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
2023-01-26 12:17:54 -07:00
|
|
|
|
|
|
|
func _on_button_2_pressed():
|
|
|
|
var scene_trs =load("res://scenes/settings.tscn")
|
2023-01-24 13:33:37 -07:00
|
|
|
var scene=scene_trs.instantiate()
|
|
|
|
add_child(scene)
|
2023-01-26 12:17:54 -07:00
|
|
|
|
|
|
|
func _on_button_3_pressed():
|
|
|
|
get_tree().quit()
|