summaryrefslogtreecommitdiff
path: root/demos/2d/space_shooter/main_menu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/space_shooter/main_menu.gd')
-rw-r--r--demos/2d/space_shooter/main_menu.gd20
1 files changed, 20 insertions, 0 deletions
diff --git a/demos/2d/space_shooter/main_menu.gd b/demos/2d/space_shooter/main_menu.gd
new file mode 100644
index 0000000000..52221aba1b
--- /dev/null
+++ b/demos/2d/space_shooter/main_menu.gd
@@ -0,0 +1,20 @@
+
+extends Control
+
+# member variables here, example:
+# var a=2
+# var b="textvar"
+
+func _ready():
+
+ get_node("score").set_text( "HIGH SCORE: "+str( get_node("/root/game_state").max_points ) )
+ # Initialization here
+ pass
+
+
+
+
+func _on_play_pressed():
+ get_node("/root/game_state").points=0
+ get_tree().change_scene("res://level.scn")
+ pass # replace with function body