File tree Expand file tree Collapse file tree 7 files changed +96
-7
lines changed Expand file tree Collapse file tree 7 files changed +96
-7
lines changed Original file line number Diff line number Diff line change
1
+ [remap]
2
+
3
+ importer="texture"
4
+ type="StreamTexture"
5
+ path="res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.stex"
6
+ metadata={
7
+ "vram_texture": false
8
+ }
9
+
10
+ [deps]
11
+
12
+ source_file="res://assets/icon.png"
13
+ dest_files=[ "res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.stex" ]
14
+
15
+ [params]
16
+
17
+ compress/mode=0
18
+ compress/lossy_quality=0.7
19
+ compress/hdr_mode=0
20
+ compress/bptc_ldr=0
21
+ compress/normal_map=0
22
+ flags/repeat=0
23
+ flags/filter=true
24
+ flags/mipmaps=false
25
+ flags/anisotropic=false
26
+ flags/srgb=2
27
+ process/fix_alpha_border=true
28
+ process/premult_alpha=false
29
+ process/HDR_as_SRGB=false
30
+ process/invert_color=false
31
+ stream=false
32
+ size_limit=0
33
+ detect_3d=true
34
+ svg/scale=1.0
Original file line number Diff line number Diff line change
1
+ [gd_scene load_steps =3 format =2 ]
2
+
3
+ [ext_resource path ="res://assets/theme.theme" type ="Theme" id =1 ]
4
+ [ext_resource path ="res://scripts/credits.gd" type ="Script" id =2 ]
5
+
6
+ [node name ="MarginContainer" type ="MarginContainer" ]
7
+ anchor_right = 1.0
8
+ anchor_bottom = 1.0
9
+ theme = ExtResource ( 1 )
10
+ custom_constants/margin_right = 40
11
+ custom_constants/margin_top = 30
12
+ custom_constants/margin_left = 40
13
+ custom_constants/margin_bottom = 30
14
+ __meta__ = {
15
+ "_edit_use_anchors_" : false
16
+ }
17
+
18
+ [node name ="Credits" type ="Label" parent ="." ]
19
+ margin_left = 40.0
20
+ margin_top = 30.0
21
+ margin_right = 1880.0
22
+ margin_bottom = 1050.0
23
+ size_flags_vertical = 3
24
+ autowrap = true
25
+ script = ExtResource ( 2 )
Original file line number Diff line number Diff line change @@ -46,17 +46,30 @@ margin_top = 973.0
46
46
margin_right = 1839.0
47
47
margin_bottom = 973.0
48
48
49
- [node name ="StartButton " type ="Button " parent ="MainMenu" ]
50
- margin_left = 872 .0
49
+ [node name ="Buttons " type ="HBoxContainer " parent ="MainMenu" ]
50
+ margin_left = 555 .0
51
51
margin_top = 981.0
52
- margin_right = 967 .0
52
+ margin_right = 1283 .0
53
53
margin_bottom = 1019.0
54
54
size_flags_horizontal = 4
55
+ custom_constants/separation = 500
56
+
57
+ [node name ="Start" type ="Button" parent ="MainMenu/Buttons" ]
58
+ margin_right = 95.0
59
+ margin_bottom = 38.0
60
+ size_flags_horizontal = 4
55
61
text = "start"
56
62
flat = true
57
63
64
+ [node name ="Credits" type ="Button" parent ="MainMenu/Buttons" ]
65
+ margin_left = 595.0
66
+ margin_right = 728.0
67
+ margin_bottom = 38.0
68
+ text = "credits"
69
+
58
70
[node name ="Timer" type ="Timer" parent ="." ]
59
71
wait_time = 0.25
60
72
autostart = true
61
- [connection signal ="pressed" from ="MainMenu/StartButton" to ="MainMenu" method ="_on_StartButton_pressed" ]
73
+ [connection signal ="pressed" from ="MainMenu/Buttons/Start" to ="MainMenu" method ="_on_Start_pressed" ]
74
+ [connection signal ="pressed" from ="MainMenu/Buttons/Credits" to ="MainMenu" method ="_on_Credits_pressed" ]
62
75
[connection signal ="timeout" from ="Timer" to ="MainMenu" method ="_on_Timer_timeout" ]
Original file line number Diff line number Diff line change
1
+ extends Label
2
+
3
+ func _ready ():
4
+ var file = File .new ()
5
+ file .open ("res://CREDITS.md" , File .READ )
6
+ text = file .get_as_text ()
7
+ file .close ()
8
+
9
+ func _process (delta ):
10
+ rect_position .y -= 1
11
+
12
+ func _input (event ):
13
+ scene .change_scene ("res://scenes/menu.tscn" )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var level
6
6
func _ready ():
7
7
# Load level data
8
8
var descriptions = File .new ()
9
- descriptions .open ("res://assets/levels.json" , descriptions .READ )
9
+ descriptions .open ("res://assets/levels.json" , File .READ )
10
10
levels = parse_json (descriptions .get_as_text ())
11
11
# Dynamically add buttons
12
12
for level in levels :
Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ extends VBoxContainer
3
3
var level = BogoSort .new (ArrayModel .new (10 ))
4
4
5
5
func _ready ():
6
- $ StartButton .grab_focus ()
6
+ $ Buttons/Start .grab_focus ()
7
7
$ Display .add_child (ArrayView .new (level ))
8
+ randomize ()
8
9
9
- func _on_StartButton_pressed ():
10
+ func _on_Start_pressed ():
10
11
scene .change_scene ("res://scenes/levels.tscn" )
11
12
13
+ func _on_Credits_pressed ():
14
+ scene .change_scene ("res://scenes/credits.tscn" )
15
+
12
16
func _on_Timer_timeout ():
13
17
level .next ()
You can’t perform that action at this time.
0 commit comments