-
Notifications
You must be signed in to change notification settings - Fork 0
/
Enemy.tscn
63 lines (53 loc) · 2.03 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
[gd_scene load_steps=9 format=2]
[ext_resource path="res://plane_pack/planes/plane_2/plane_2_blue.png" type="Texture" id=1]
[ext_resource path="res://Enemy.gd" type="Script" id=2]
[ext_resource path="res://plane_pack/planes/plane_2/plane_2_red.png" type="Texture" id=3]
[ext_resource path="res://plane_pack/planes/plane_2/plane_2_yellow.png" type="Texture" id=4]
[ext_resource path="res://plane_pack/planes/plane_2/plane_2_green.png" type="Texture" id=5]
[ext_resource path="res://EnemyBullet.tscn" type="PackedScene" id=6]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 1 ) ],
"loop": true,
"name": "plane_blue",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ) ],
"loop": true,
"name": "plane_red",
"speed": 5.0
}, {
"frames": [ ExtResource( 5 ) ],
"loop": true,
"name": "plane_green",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ) ],
"loop": true,
"name": "plane_yellow",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 50.5582, 27.8068 )
[node name="Enemy" type="Area2D" groups=["enemies"]]
collision_mask = 0
script = ExtResource( 2 )
bullet = ExtResource( 6 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
scale = Vector2( 0.1, 0.1 )
frames = SubResource( 1 )
animation = "plane_red"
flip_h = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
position = Vector2( 0.235971, -0.117982 )
scale = Vector2( 5.05866, 2.78156 )
[node name="BulletPosition" type="Position2D" parent="."]
position = Vector2( -51.9719, 10.6631 )
[node name="BulletSpawn" type="Timer" parent="."]
wait_time = 1.5
[connection signal="area_entered" from="." to="." method="_on_Enemy_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_Enemy_body_entered"]
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
[connection signal="timeout" from="BulletSpawn" to="." method="_on_BulletSpawn_timeout"]