[gd_scene load_steps=8 format=3 uid="uid://cbo47ftx0vcro"] [ext_resource type="Script" path="res://scripts/ship.gd" id="1_japvq"] [ext_resource type="Texture2D" uid="uid://qcnuvee2jcp0" path="res://assets/img/ship.png" id="1_ymcdl"] [ext_resource type="AudioStream" uid="uid://cg6v2xvf4jkkv" path="res://assets/sfx/shoot.wav" id="3_kvryg"] [ext_resource type="AudioStream" uid="uid://cycpanck51dqd" path="res://assets/sfx/explosion.wav" id="4_gdodt"] [sub_resource type="Animation" id="Animation_ctlro"] resource_name = "crash" tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("CrashSound:playing") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [true] } tracks/1/type = "method" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath(".") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0.6), "transitions": PackedFloat32Array(1), "values": [{ "args": [], "method": &"queue_free" }] } [sub_resource type="Animation" id="Animation_qfhr1"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("CrashSound:playing") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_3jmf3"] _data = { "RESET": SubResource("Animation_qfhr1"), "crash": SubResource("Animation_ctlro") } [node name="Ship" type="CharacterBody2D" groups=["ship"]] collision_mask = 2 script = ExtResource("1_japvq") [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("1_ymcdl") [node name="CPUParticles2D" type="CPUParticles2D" parent="Sprite2D"] position = Vector2(0, 18) emission_shape = 1 emission_sphere_radius = 3.0 spread = 105.9 gravity = Vector2(0, 0) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] position = Vector2(0, -1) polygon = PackedVector2Array(-3, -31, 4, -31, 32, 28, 32, 33, 28, 33, 1, 16, -24, 33, -32, 33, -32, 27) [node name="ShotCooldown" type="Timer" parent="."] wait_time = 0.75 one_shot = true [node name="Gun" type="Marker2D" parent="."] position = Vector2(0, -33) [node name="Projectiles" type="Node" parent="."] [node name="ShootSound" type="AudioStreamPlayer" parent="."] stream = ExtResource("3_kvryg") [node name="CrashSound" type="AudioStreamPlayer" parent="."] stream = ExtResource("4_gdodt") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { "": SubResource("AnimationLibrary_3jmf3") } [connection signal="timeout" from="ShotCooldown" to="." method="_on_shot_cooldown_timeout"]