-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tank.tscn
200 lines (168 loc) · 6.35 KB
/
Tank.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
[gd_scene load_steps=15 format=2]
[ext_resource path="res://images/tank.png" type="Texture" id=1]
[ext_resource path="res://Tank.gd" type="Script" id=2]
[ext_resource path="res://Shell.tscn" type="PackedScene" id=3]
[ext_resource path="res://images/nuzzle.png" type="Texture" id=4]
[ext_resource path="res://VisibilityTimer.gd" type="Script" id=5]
[ext_resource path="res://images/cell.png" type="Texture" id=6]
[ext_resource path="res://fonts/Xolonium-Regular.ttf" type="DynamicFontData" id=7]
[ext_resource path="res://Box.tscn" type="PackedScene" id=8]
[ext_resource path="res://Robot.gd" type="Script" id=9]
[ext_resource path="res://images/robot.png" type="Texture" id=10]
[ext_resource path="res://images/remove.png" type="Texture" id=11]
[sub_resource type="ParticlesMaterial" id=1]
lifetime_randomness = 0.32
flag_disable_z = true
direction = Vector3( 0, 0, 0 )
spread = 180.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 74.29
angular_velocity = 24.68
angular_velocity_random = 0.1
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel = -100.0
radial_accel = 48.0
damping = 18.86
damping_random = 0.49
scale = 13.43
scale_random = 1.0
color = Color( 0.2, 0.2, 0.2, 1 )
[sub_resource type="DynamicFont" id=2]
size = 108
font_data = ExtResource( 7 )
[sub_resource type="CircleShape2D" id=3]
[node name="Tank" type="RigidBody2D" groups=[
"heavy",
"tank",
"target",
]]
position = Vector2( 200, 200 )
z_index = 1
z_as_relative = false
collision_layer = 3
collision_mask = 3
linear_damp = 8.434
angular_damp = 12.319
script = ExtResource( 2 )
Shell = ExtResource( 3 )
Box = ExtResource( 8 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0.180908, -5.59229 )
scale = Vector2( 0.0632796, 0.0632796 )
texture = ExtResource( 1 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2( 0.180908, -5.59229 )
scale = Vector2( 0.0632796, 0.0632796 )
polygon = PoolVector2Array( 322.464, -321.282, 323.929, 470.29, 112.747, 472.049, 110.987, 336.541, -110.753, 334.781, -108.993, 468.53, -325.455, 468.53, -326.518, -319.41, -72.6606, -318.788, -72.4902, -472.628, 74.8008, -472.471, 76.0452, -320.032 )
[node name="Muzzle" type="Position2D" parent="."]
position = Vector2( 0.16684, -38.2098 )
[node name="MuzzleFire" type="Sprite" parent="Muzzle"]
position = Vector2( -0.16684, -9.51089 )
scale = Vector2( 0.063, 0.063 )
texture = ExtResource( 4 )
[node name="Timer" type="Timer" parent="Muzzle/MuzzleFire"]
wait_time = 0.09
script = ExtResource( 5 )
[node name="LoadTimer" type="Timer" parent="."]
wait_time = 0.26
[node name="Life" type="Node2D" parent="."]
[node name="Low" type="Sprite" parent="Life"]
modulate = Color( 0.211765, 0.568627, 0.180392, 1 )
position = Vector2( 38.4641, 25.9182 )
scale = Vector2( -0.0707349, -0.07 )
texture = ExtResource( 6 )
offset = Vector2( 533.2, 114.558 )
[node name="Medium" type="Sprite" parent="Life"]
modulate = Color( 0.211765, 0.568627, 0.180392, 1 )
position = Vector2( 38.4609, 13.8198 )
scale = Vector2( -0.0707349, -0.07 )
texture = ExtResource( 6 )
offset = Vector2( 533.2, 114.558 )
[node name="High" type="Sprite" parent="Life"]
modulate = Color( 0.211765, 0.568627, 0.180392, 1 )
position = Vector2( 38.3301, 1.74805 )
scale = Vector2( -0.0707349, -0.07 )
texture = ExtResource( 6 )
offset = Vector2( 533.2, 114.558 )
[node name="Full" type="Sprite" parent="Life"]
modulate = Color( 0.443137, 0.443137, 0.443137, 1 )
position = Vector2( 38.512, -10.3325 )
scale = Vector2( -0.0707349, -0.07 )
texture = ExtResource( 6 )
offset = Vector2( 533.2, 114.558 )
[node name="Fade" type="Timer" parent="Life"]
wait_time = 0.728
[node name="Explosion" type="Particles2D" parent="."]
show_behind_parent = true
z_index = -1
emitting = false
amount = 50
lifetime = 2.0
one_shot = true
speed_scale = 4.52
explosiveness = 0.45
process_material = SubResource( 1 )
[node name="Label" type="Label" parent="."]
margin_left = -20.5546
margin_top = -12.1113
margin_right = 210.445
margin_bottom = 118.889
rect_scale = Vector2( 0.180955, 0.180955 )
custom_fonts/font = SubResource( 2 )
text = "200"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Hide" type="Timer" parent="Label"]
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2( 0.78746, -4.09473 )
zoom = Vector2( 0.15, 0.15 )
[node name="FocusTimer" type="Timer" parent="Camera2D"]
wait_time = 0.49
[node name="InitTimer" type="Timer" parent="."]
wait_time = 1.4
one_shot = true
autostart = true
[node name="Button" type="TouchScreenButton" parent="."]
position = Vector2( -32.7036, -38.7104 )
scale = Vector2( 3.27957, 3.6002 )
shape = SubResource( 3 )
[node name="MouseButton" type="Button" parent="."]
modulate = Color( 1, 1, 1, 0 )
margin_left = -21.3315
margin_top = -25.832
margin_right = 23.6685
margin_bottom = 21.168
rect_scale = Vector2( 0.939053, 1.05825 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Robot" type="Node2D" parent="."]
script = ExtResource( 9 )
[node name="Destination" type="Polygon2D" parent="Robot"]
visible = false
polygon = PoolVector2Array( 6.15118, 6.07089, 5.35748, -6.62831, -4.76219, -6.82674, -4.36534, 6.07089 )
[node name="RayCast2D" type="RayCast2D" parent="Robot"]
cast_to = Vector2( 0, 400 )
[node name="FireLine" type="RayCast2D" parent="Robot"]
enabled = true
cast_to = Vector2( 0, -1000 )
[node name="Sprite" type="Sprite" parent="Robot"]
position = Vector2( 0, 4 )
scale = Vector2( 0.063, 0.063 )
texture = ExtResource( 10 )
[node name="Remove" type="Sprite" parent="."]
scale = Vector2( 0.063, 0.063 )
texture = ExtResource( 11 )
[connection signal="timeout" from="Muzzle/MuzzleFire/Timer" to="Muzzle/MuzzleFire/Timer" method="_on_Timer_timeout"]
[connection signal="timeout" from="Muzzle/MuzzleFire/Timer" to="." method="_on_Timer_timeout"]
[connection signal="timeout" from="LoadTimer" to="." method="_on_LoadTimer_timeout"]
[connection signal="timeout" from="Life/Fade" to="." method="_on_Fade_timeout"]
[connection signal="timeout" from="Label/Hide" to="." method="_on_Hide_timeout"]
[connection signal="timeout" from="Camera2D/FocusTimer" to="." method="_on_Timer_timeout"]
[connection signal="timeout" from="Camera2D/FocusTimer" to="." method="_on_FocusTimer_timeout"]
[connection signal="timeout" from="InitTimer" to="." method="_on_InitTimer_timeout"]
[connection signal="pressed" from="Button" to="." method="_on_TankButton_pressed"]
[connection signal="pressed" from="MouseButton" to="." method="_on_MouseButton_pressed"]