platformer-game-test/src/Menu/MainMenu.gd
Sagi Dayan 1c640fcd39 Added a main menu.
- Controls section still not implemented. Dont thing we need it at all
 - Need to add last best score + player name Maybe...
2020-09-27 16:42:40 -04:00

21 lines
472 B
GDScript

extends Node2D
func _ready() -> void:
$CanvasLayer/Control/VBoxContainer/NewGameBtn.grab_focus()
func _on_ExitGameBtn_pressed() -> void:
get_tree().quit(0)
pass # Replace with function body.
func _on_ControlsBtn_pressed() -> void:
print("Not working yet")
pass # Replace with function body.
func _on_NewGameBtn_pressed() -> void:
var next_scene = load("res://src/Levels/LevelTemplate/LevelTemplate.tscn")
get_tree().change_scene_to(next_scene)
queue_free()