PirateTreasureHunt/Menu.gd

32 lines
665 B
GDScript

extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_SimpleButton_pressed():
Globals.game_num_islands = 4;
get_tree().change_scene("res://scenes/Game.tscn")
func _on_MediumButton_pressed():
Globals.game_num_islands = 6;
get_tree().change_scene("res://scenes/Game.tscn")
func _on_HardButton_pressed():
Globals.game_num_islands = 10;
get_tree().change_scene("res://scenes/Game.tscn")