-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStartMenu.tscn
63 lines (49 loc) · 1.47 KB
/
StartMenu.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Sprites/Illustrator Images/StartMenu-01-01.png" type="Texture" id=1]
[sub_resource type="GDScript" id=1]
script/source = "extends Control
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
# Called when the node enters the scene tree for the first time.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
var last_changed_time : int
var change_rate = 0.65
var uber_sound
var cold_sound
var canInput = true
# Called when the node enters the scene tree for the first time.
func _ready():
set_process_input(true)
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
canInput = true
OS.window_fullscreen = true
func _input(event):
if not canInput:
return
if (event.is_action_pressed(\"escape\")):
get_tree().quit()
canInput = false
return
if event.is_action_pressed(\"start_normal_game\"):
get_node(\"/root/Game\").choose_level_type(\"normal\");
get_node(\"/root/Game\").next_level()
canInput = false
return
if event.is_action_pressed(\"start_hard_game\"):
get_node(\"/root/Game\").choose_level_type(\"hard\")
get_node(\"/root/Game\").next_level()
canInput = false
return"
[node name="Start Menu" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = SubResource( 1 )
[node name="TextureRect" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 1 )
expand = true
stretch_mode = 5