-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Enemy.tscn
211 lines (174 loc) · 4.95 KB
/
Enemy.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
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Enemy.gd" type="Script" id=1]
[ext_resource path="res://EnemyBullet.tscn" type="PackedScene" id=2]
[ext_resource path="res://art/ufoGreen.png" type="Texture" id=3]
[ext_resource path="res://EnemyPaths.tscn" type="PackedScene" id=4]
[ext_resource path="res://audio/enemy_laser.wav" type="AudioStream" id=5]
[ext_resource path="res://audio/enemy_hit.wav" type="AudioStream" id=6]
[ext_resource path="res://art/corona.png" type="Texture" id=7]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 36.7521
[sub_resource type="Animation" id=2]
resource_name = "hit"
length = 0.25
loop = false
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ]
}
[sub_resource type="Animation" id=3]
resource_name = "rotate"
length = 1.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:rotation_deg")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 180.0, 360.0 ]
}
[sub_resource type="CanvasItemMaterial" id=4]
render_priority = 0
blend_mode = 1
light_mode = 0
[sub_resource type="Curve" id=5]
min_value = 0.0
max_value = 1.0
bake_resolution = 100
_data = [ Vector2( 0.00203111, 0.124023 ), 0.0, 0.0, 0, 0, Vector2( 0.998698, 0.0488281 ), 0.342644, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=6]
width = 2048
curve = SubResource( 5 )
[sub_resource type="ParticlesMaterial" id=7]
render_priority = 0
trail_divisor = 1
emission_shape = 2
emission_box_extents = Vector3( 20, 20, 1 )
flag_align_y = false
flag_rotate_y = false
flag_disable_z = true
spread = 25.0
flatness = 0.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 1.0
initial_velocity_random = 0.0
angular_velocity = 7.18379e+22
angular_velocity_random = 0.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel = 0.0
linear_accel_random = 0.0
radial_accel = 0.0
radial_accel_random = 0.0
tangential_accel = 0.0
tangential_accel_random = 0.0
damping = 0.0
damping_random = 0.0
angle = 0.0
angle_random = 0.0
scale = 1.0
scale_random = 0.0
scale_curve = SubResource( 6 )
color = Color( 1, 1, 1, 1 )
hue_variation = 0.0
hue_variation_random = 0.0
anim_speed = 0.0
anim_speed_random = 0.0
anim_offset = 0.0
anim_offset_random = 0.0
anim_loop = false
_sections_unfolded = [ "Color", "Emission Shape", "Flags", "Resource", "Spread" ]
[node name="Enemy" type="Area2D" groups=[
"enemies",
]]
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
bullet = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
rotation = 2.68493
scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 3 )
_sections_unfolded = [ "Transform", "Visibility" ]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource( 1 )
[node name="EnemyPaths" parent="." instance=ExtResource( 4 )]
[node name="ShootTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 1.0
one_shot = false
autostart = false
[node name="PulseTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 1.0
one_shot = false
autostart = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_process_mode = 1
playback_default_blend_time = 0.0
root_node = NodePath("..")
anims/hit = SubResource( 2 )
anims/rotate = SubResource( 3 )
playback/active = true
playback/speed = 0.6
blend_times = [ ]
autoplay = "rotate"
_sections_unfolded = [ "Playback Options", "playback" ]
[node name="LaserSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
volume_db = -5.0
autoplay = false
mix_target = 0
bus = "Master"
[node name="HitSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
volume_db = -5.0
autoplay = false
mix_target = 0
bus = "Master"
[node name="Trail" type="Particles2D" parent="."]
show_behind_parent = true
material = SubResource( 4 )
emitting = true
amount = 20
lifetime = 1.0
one_shot = false
preprocess = 0.0
speed_scale = 1.0
explosiveness = 0.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_rect = Rect2( -100, -100, 200, 200 )
local_coords = false
draw_order = 0
process_material = SubResource( 7 )
texture = ExtResource( 7 )
normal_map = null
h_frames = 1
v_frames = 1
_sections_unfolded = [ "Drawing", "Material", "Process Material", "Textures", "Time", "Visibility" ]
[connection signal="timeout" from="ShootTimer" to="." method="_on_ShootTimer_timeout"]