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
|
[gd_scene load_steps=12 format=1]
[ext_resource path="res://rail.gd" type="Script" id=1]
[ext_resource path="res://ship.gd" type="Script" id=2]
[ext_resource path="res://ship.png" type="Texture" id=3]
[ext_resource path="res://fire.png" type="Texture" id=4]
[ext_resource path="res://explosion.tscn" type="PackedScene" id=5]
[ext_resource path="res://sound_shoot.wav" type="Sample" id=6]
[ext_resource path="res://sound_explode.wav" type="Sample" id=7]
[sub_resource type="ConvexPolygonShape2D" id=1]
custom_solver_bias = 0.0
points = Vector2Array( 25.9104, 1.3603, -20.5637, 14.8656, -20.5637, -15.3227 )
[sub_resource type="ColorRamp" id=2]
offsets = FloatArray( 0, 0.474062, 0.653631, 1 )
colors = ColorArray( 0.154794, 0.413313, 0.991004, 1, 0.555474, 0.971578, 0, 1, 0.82934, 0.989088, 0.616085, 0.383915, 1, 1, 1, 0 )
[sub_resource type="Animation" id=3]
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:visibility/visible")
tracks/0/interp = 1
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
tracks/1/type = "value"
tracks/1/path = NodePath("thruster:config/emitting")
tracks/1/interp = 1
tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] }
tracks/2/type = "value"
tracks/2/path = NodePath("explosion:config/emitting")
tracks/2/interp = 1
tracks/2/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
[sub_resource type="SampleLibrary" id=4]
samples/shoot = { "db":0.0, "pitch":1.0, "sample":ExtResource( 6 ) }
samples/sound_explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 7 ) }
[node name="rail" type="Node2D"]
script/script = ExtResource( 1 )
[node name="ship" type="Area2D" parent="."]
transform/pos = Vector2( 253.607, 282.275 )
input/pickable = true
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 2 )
[node name="sprite" type="Sprite" parent="ship"]
texture = ExtResource( 3 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ship"]
build_mode = 0
polygon = Vector2Array( -20.5637, -15.3227, 25.9104, 1.3603, -20.5637, 14.8656 )
shape_range = Vector2( -1, -1 )
trigger = false
[node name="thruster" type="Particles2D" parent="ship"]
visibility/blend_mode = 1
transform/pos = Vector2( -26.528, -0.358481 )
transform/rot = -91.1436
config/amount = 32
config/lifetime = 2.0
config/time_scale = 5.0
config/emitting = false
config/local_space = false
config/texture = ExtResource( 4 )
params/direction = 0.0
params/spread = 10.0
params/linear_velocity = 20.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 1.0
params/final_size = 1.0
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
color/color_ramp = SubResource( 2 )
[node name="anim" type="AnimationPlayer" parent="ship"]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/explode = SubResource( 3 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = ""
[node name="shootfrom" type="Position2D" parent="ship"]
transform/pos = Vector2( 35.3307, 0.875969 )
[node name="explosion" parent="ship" instance=ExtResource( 5 )]
transform/rot = -91.1436
config/explosiveness = 0.1
params/gravity_strength = 9.8
[node name="sfx" type="SamplePlayer" parent="ship"]
config/polyphony = 1
config/samples = SubResource( 4 )
default/volume_db = 0.0
default/pitch_scale = 1.0
default/pan = 0.0
default/depth = 0.0
default/height = 0.0
default/filter/type = 0
default/filter/cutoff = 0.0
default/filter/resonance = 0.0
default/filter/gain = 0.0
default/reverb_room = 2
default/reverb_send = 0.0
default/chorus_send = 0.0
[node name="camera" type="Camera2D" parent="."]
anchor_mode = 0
rotating = false
current = true
zoom = Vector2( 1, 1 )
limit/left = -10000000
limit/top = -10000000
limit/right = 10000000
limit/bottom = 10000000
drag_margin/h_enabled = true
drag_margin/v_enabled = true
smoothing/enable = false
smoothing/speed = 5.0
drag_margin/left = 0.2
drag_margin/top = 0.2
drag_margin/right = 0.2
drag_margin/bottom = 0.2
[node name="hud" type="CanvasLayer" parent="."]
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
[node name="score" type="Label" parent="hud"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = 15.0
margin/top = 13.0
margin/right = 66.0
margin/bottom = 26.0
text = "SCORE:"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="score_points" type="Label" parent="hud"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = 70.0
margin/top = 13.0
margin/right = 121.0
margin/bottom = 26.0
text = "0"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="back_to_menu" type="Button" parent="hud"]
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 911.0
margin/top = 10.0
margin/right = 1006.0
margin/bottom = 31.0
toggle_mode = false
text = "Back to Menu"
flat = false
[node name="game_over" type="Label" parent="hud"]
visibility/visible = false
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
margin/left = 482.0
margin/top = 286.0
margin/right = 564.0
margin/bottom = 299.0
text = "GAME_OVER"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[connection signal="body_enter" from="ship" to="ship" method="_on_ship_body_enter"]
[connection signal="area_enter" from="ship" to="ship" method="_on_ship_area_enter"]
[connection signal="pressed" from="hud/back_to_menu" to="ship" method="_on_back_to_menu_pressed"]
|