Files
SWGalaga/Scenes/enemy_ywing.tscn
2024-07-06 04:58:09 -04:00

71 lines
2.7 KiB
Plaintext

[gd_scene load_steps=6 format=3 uid="uid://6xeat2a1yr6k"]
[ext_resource type="Texture2D" uid="uid://bayc56dplo4ub" path="res://Assets/Y-Wing_Draft.png" id="1_i65b5"]
[ext_resource type="Script" path="res://Scripts/enemy_ywing.gd" id="1_ox3kv"]
[ext_resource type="Texture2D" uid="uid://drtiwwj2pa73x" path="res://Assets/Y-Wing_Turret.png" id="2_wt4e7"]
[sub_resource type="AtlasTexture" id="AtlasTexture_7hq4j"]
atlas = ExtResource("1_i65b5")
region = Rect2(0, 0, 157, 310)
[sub_resource type="SpriteFrames" id="SpriteFrames_wfy5i"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_7hq4j")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="enemy_ywing" type="Area2D" groups=["enemies"]]
collision_layer = 4
collision_mask = 11
script = ExtResource("1_ox3kv")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_wfy5i")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(13, 140, 25, 122, 28, 111, 28, 66, 23, 61, 18, 61, 18, 31, 20, 29, 20, 24, 30, 24, 31, 41, 38, 47, 49, 47, 56, 40, 56, -45, 56, -124, 60, -127, 53, -133, 33, -133, 28, -126, 31, -122, 31, -3, 20, -3, 20, -28, 15, -32, -15, -32, -19, -27, -19, -3, -21, -3, -30, -3, -30, -123, -27, -127, -34, -133, -52, -133, -58, -127, -55, -123, -55, 39, -49, 46, -36, 46, -30, 40, -30, 25, -18, 25, -18, 30, -17, 32, -17, 61, -22, 61, -28, 68, -28, 111, -24, 122, -13, 139, -11, 140, -9, 146, -5, 146, -4, 140, 4, 140, 6, 146, 10, 146)
[node name="Muzzle1" type="Marker2D" parent="."]
position = Vector2(0, 146)
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2(0, 141)
target_position = Vector2(1, 821)
collision_mask = 11
[node name="Turret" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(1, 10)
texture = ExtResource("2_wt4e7")
offset = Vector2(0, 5.2)
[node name="turret_Center" type="Marker2D" parent="Turret"]
[node name="turret_muzzle" type="Marker2D" parent="Turret"]
position = Vector2(0, 21)
[node name="target_confirm" type="RayCast2D" parent="Turret"]
target_position = Vector2(-1, 873)
collision_mask = 11
collide_with_areas = true
[node name="refire_timer1" type="Timer" parent="."]
wait_time = 5.0
[node name="refire_timer2" type="Timer" parent="."]
wait_time = 5.0
[node name="death_timer" type="Timer" parent="."]
wait_time = 0.5
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="timeout" from="refire_timer1" to="." method="_on_refire_timer_1_timeout"]
[connection signal="timeout" from="refire_timer2" to="." method="_on_refire_timer_2_timeout"]
[connection signal="timeout" from="death_timer" to="." method="_on_death_timer_timeout"]