-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.tscn
246 lines (214 loc) · 5.97 KB
/
game.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
[gd_scene load_steps=6 format=2]
[ext_resource path="res://cam.gd" type="Script" id=1]
[ext_resource path="res://RoadGeneration.gd" type="Script" id=2]
[ext_resource path="res://game.gd" type="Script" id=3]
[ext_resource path="res://ColorRect.gd" type="Script" id=4]
[sub_resource type="Environment" id=1]
background_mode = 4
glow_enabled = true
glow_bloom = 0.27
[node name="game" type="Node2D"]
pause_mode = 2
script = ExtResource( 3 )
[node name="CanvasLayer" type="CanvasLayer" parent="."]
pause_mode = 1
layer = -10
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0.211765, 0.211765, 0.243137, 1 )
script = ExtResource( 4 )
[node name="look-goodifier" type="WorldEnvironment" parent="."]
pause_mode = 1
environment = SubResource( 1 )
[node name="RoadGeneration" type="StaticBody2D" parent="."]
pause_mode = 1
collision_layer = 2
script = ExtResource( 2 )
[node name="start" type="ColorRect" parent="."]
pause_mode = 1
margin_left = 184.0
margin_top = 320.0
margin_right = 200.0
margin_bottom = 336.0
color = Color( 0.0509804, 0.67451, 0, 1 )
[node name="end" type="ColorRect" parent="."]
pause_mode = 1
margin_left = 2500.0
margin_top = 320.0
margin_right = 2516.0
margin_bottom = 336.0
color = Color( 0.67451, 0, 0, 1 )
[node name="HUD" type="CanvasLayer" parent="."]
layer = 100
[node name="ColorRect" type="ColorRect" parent="HUD"]
margin_left = 1.05951
margin_top = 2.39825
margin_right = 1025.06
margin_bottom = 90.3983
color = Color( 0, 0, 0, 1 )
[node name="StartButton" type="Button" parent="HUD"]
margin_left = 33.0595
margin_top = 26.3983
margin_right = 177.06
margin_bottom = 58.3983
text = "Start generation"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ResetButton" type="Button" parent="HUD"]
margin_left = 192.06
margin_top = 26.3983
margin_right = 309.06
margin_bottom = 58.3983
text = "Reset"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GenSizeLabel" type="Label" parent="HUD"]
margin_left = 336.06
margin_top = 16.3983
margin_right = 469.06
margin_bottom = 30.3983
text = "Generation size = 20"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GenSizeSlider" type="HSlider" parent="HUD"]
margin_left = 337.06
margin_top = 33.3983
margin_right = 472.06
margin_bottom = 49.3983
min_value = 7.0
max_value = 50.0
value = 20.0
[node name="ZoomLabel" type="Label" parent="HUD"]
margin_left = 530.06
margin_top = 41.3983
margin_right = 642.06
margin_bottom = 65.3983
text = "Zoom = 1.0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HScrollBar" type="HScrollBar" parent="HUD"]
margin_left = 522.06
margin_top = 57.3983
margin_right = 650.06
margin_bottom = 73.3983
min_value = 0.1
max_value = 5.0
value = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GenLabel" type="Label" parent="HUD"]
margin_left = 528.06
margin_top = 14.3983
margin_right = 616.06
margin_bottom = 30.3983
text = "Generation: 0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TimeLabel" type="Label" parent="HUD"]
margin_left = 224.0
margin_top = 64.0
margin_right = 320.0
margin_bottom = 88.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FitnessButton" type="OptionButton" parent="HUD"]
margin_left = 336.06
margin_top = 55.3983
margin_right = 506.06
margin_bottom = 75.3983
__meta__ = {
"_edit_use_anchors_": false
}
[node name="gentimelabel" type="Label" parent="HUD"]
margin_left = 192.0
margin_top = 64.0
margin_right = 320.0
margin_bottom = 96.0
[node name="lifetime" type="HScrollBar" parent="HUD"]
margin_left = 664.06
margin_top = 58.3983
margin_right = 824.06
margin_bottom = 82.3983
min_value = 2.0
step = 1.0
value = 15.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="HUD"]
margin_left = 688.06
margin_top = 42.3983
margin_right = 786.06
margin_bottom = 66.3983
text = "MAX LIFETIME: "
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HScrollBar2" type="HScrollBar" parent="HUD"]
margin_left = 897.767
margin_top = 63.8333
margin_right = 997.767
margin_bottom = 83.8333
min_value = 1.0
max_value = 10.0
step = 1.0
value = 3.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label2" type="Label" parent="HUD"]
margin_left = 905.06
margin_top = 41.9546
margin_right = 990.06
margin_bottom = 61.9546
text = "Time scale: 3"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="viewbest" type="CheckButton" parent="HUD"]
margin_left = 633.378
margin_top = 3.10535
margin_right = 806.378
margin_bottom = 43.1054
text = "View best only"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label3" type="Label" parent="HUD"]
margin_left = 40.0
margin_top = 64.0
margin_right = 192.0
margin_bottom = 86.0
[node name="selection" type="OptionButton" parent="HUD"]
margin_left = 864.0
margin_top = 8.0
margin_right = 1016.0
margin_bottom = 32.0
[node name="cars" type="Node2D" parent="."]
pause_mode = 1
[node name="cam" type="Camera2D" parent="."]
position = Vector2( 512, 304 )
current = true
script = ExtResource( 1 )
[node name="gentimelimit" type="Timer" parent="."]
pause_mode = 1
process_mode = 0
one_shot = true
[connection signal="pressed" from="HUD/StartButton" to="." method="_on_StartButton_pressed"]
[connection signal="pressed" from="HUD/ResetButton" to="." method="_on_ResetButton_pressed"]
[connection signal="value_changed" from="HUD/GenSizeSlider" to="." method="_on_GenSizeSlider_value_changed"]
[connection signal="value_changed" from="HUD/HScrollBar" to="." method="_on_HScrollBar_value_changed"]
[connection signal="item_selected" from="HUD/FitnessButton" to="." method="_on_FitnessButton_item_selected"]
[connection signal="value_changed" from="HUD/lifetime" to="." method="_on_lifetime_value_changed"]
[connection signal="value_changed" from="HUD/HScrollBar2" to="." method="_on_HScrollBar2_value_changed"]
[connection signal="toggled" from="HUD/viewbest" to="." method="_on_viewbest_toggled"]
[connection signal="item_selected" from="HUD/selection" to="." method="_on_selection_item_selected"]
[connection signal="timeout" from="gentimelimit" to="." method="_on_gentimelimit_timeout"]