55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
|
|
[gd_scene load_steps=5 format=3 uid="uid://bosls7rmiowe1"]
|
||
|
|
|
||
|
|
[ext_resource type="Texture2D" uid="uid://cetru5kowfvem" path="res://Assets/Xwing_tileset_Alphapng.png" id="1_6o3l6"]
|
||
|
|
[ext_resource type="Script" path="res://Scripts/enemy_xwing.gd" id="1_rtl0e"]
|
||
|
|
|
||
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_j5lso"]
|
||
|
|
atlas = ExtResource("1_6o3l6")
|
||
|
|
region = Rect2(0, 0, 174, 138)
|
||
|
|
|
||
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_7n0lo"]
|
||
|
|
animations = [{
|
||
|
|
"frames": [],
|
||
|
|
"loop": true,
|
||
|
|
"name": &"death",
|
||
|
|
"speed": 5.0
|
||
|
|
}, {
|
||
|
|
"frames": [{
|
||
|
|
"duration": 1.0,
|
||
|
|
"texture": SubResource("AtlasTexture_j5lso")
|
||
|
|
}],
|
||
|
|
"loop": true,
|
||
|
|
"name": &"default",
|
||
|
|
"speed": 5.0
|
||
|
|
}]
|
||
|
|
|
||
|
|
[node name="Area2D" type="Area2D" groups=["enemies"]]
|
||
|
|
collision_layer = 4
|
||
|
|
collision_mask = 11
|
||
|
|
script = ExtResource("1_rtl0e")
|
||
|
|
|
||
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||
|
|
sprite_frames = SubResource("SpriteFrames_7n0lo")
|
||
|
|
autoplay = "default"
|
||
|
|
|
||
|
|
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||
|
|
polygon = PackedVector2Array(-11, 60, -15, 57, -17, 51, -19, 42, -17, 41, -19, 32, -22, -19, -37, -19, -43, -22, -67, -22, -67, 10, -64, 14, -68, 17, -73, 16, -75, 11, -74, 8, -74, -20, -74, -47, -66, -47, -26, -69, 9, -68, 52, -46, 59, -46, 59, 13, 59, 17, 52, 18, 50, 14, 49, 9, 50, 6, 50, -4, 50, -21, 43, -23, 23, -21, 20, -17, 7, -17, 3, 32, 1, 41, 2, 43, 2, 51, -2, 59, -7, 61)
|
||
|
|
|
||
|
|
[node name="death_timer" type="Timer" parent="."]
|
||
|
|
wait_time = 0.025
|
||
|
|
|
||
|
|
[node name="Marker2D" type="Marker2D" parent="."]
|
||
|
|
position = Vector2(-8, -33)
|
||
|
|
|
||
|
|
[node name="RayCast2D" type="RayCast2D" parent="."]
|
||
|
|
position = Vector2(-8, 66)
|
||
|
|
target_position = Vector2(0, 877)
|
||
|
|
collision_mask = 11
|
||
|
|
|
||
|
|
[node name="Firing_timer" type="Timer" parent="."]
|
||
|
|
wait_time = 3.0
|
||
|
|
|
||
|
|
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||
|
|
[connection signal="timeout" from="death_timer" to="." method="_on_death_timer_timeout"]
|
||
|
|
[connection signal="timeout" from="Firing_timer" to="." method="_on_firing_timer_timeout"]
|