[gd_scene load_steps=14 format=3 uid="uid://bjbccem28ir8r"]

[ext_resource type="Script" path="res://Scripts/player.gd" id="1_2bkpj"]
[ext_resource type="PackedScene" uid="uid://do4a4d3u60iy1" path="res://Scenes/Bullets/bullet.tscn" id="2_ogm6h"]
[ext_resource type="Texture2D" uid="uid://c5kt81t5h4vgn" path="res://Textures/Plane/Plane.png" id="3_5g2vf"]
[ext_resource type="AudioStream" uid="uid://dg1f8fv4a2jdm" path="res://Sound/Explosion.ogg" id="3_apj4i"]
[ext_resource type="Texture2D" uid="uid://bcbjh2amre7ke" path="res://Textures/Plane/PlaneUp.png" id="3_t0dqt"]
[ext_resource type="AudioStream" uid="uid://do4a5aj5a0216" path="res://Sound/Shoot.ogg" id="4_m3gyy"]
[ext_resource type="Texture2D" uid="uid://bff4pkabs2ecf" path="res://Textures/Plane/PlaneDown.png" id="5_ylcev"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_u1ywu"]
size = Vector2(220, 68)

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_xtmdc"]
particle_flag_disable_z = true
emission_shape = 3
emission_box_extents = Vector3(0, 12, 1)
direction = Vector3(-1, 0, 0)
spread = 0.0
initial_velocity_min = 650.0
initial_velocity_max = 650.0
gravity = Vector3(0, 0, 0)
scale_max = 8.0
color = Color(0.513233, 0.513233, 0.513233, 1)

[sub_resource type="Animation" id="Animation_bb0i0"]
resource_name = "Death"
length = 5.0
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("GPUParticles2D2:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("GPUParticles2D:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("ColorRect:color")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(3, 5),
"transitions": PackedFloat32Array(1, 2),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
}
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(4.99),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"GoToScene"
}]
}

[sub_resource type="Animation" id="Animation_vh54h"]
resource_name = "Hit"
length = 3.01
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1), Color(1, 1, 1, 0.392157), Color(1, 1, 1, 1)]
}

[sub_resource type="Animation" id="Animation_gbl2x"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:visible")
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 = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("GPUParticles2D2:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("GPUParticles2D:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("ColorRect:color")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 0)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".:modulate")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_vkafp"]
_data = {
"Death": SubResource("Animation_bb0i0"),
"Hit": SubResource("Animation_vh54h"),
"RESET": SubResource("Animation_gbl2x")
}

[node name="Player" type="CharacterBody2D" groups=["Player"]]
collision_layer = 4
collision_mask = 4
motion_mode = 1
script = ExtResource("1_2bkpj")
Speed = 400
Bullet = ExtResource("2_ogm6h")
FireRate = 0.04
PlaneUp = ExtResource("3_t0dqt")
PlaneNeutral = ExtResource("3_5g2vf")
PlaneDown = ExtResource("5_ylcev")

[node name="Area2D" type="Area2D" parent="."]
position = Vector2(3, 3)

[node name="EnemyCollider" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0.5, 3.5)
shape = SubResource("RectangleShape2D_u1ywu")

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Area2D"]
stream = ExtResource("3_apj4i")

[node name="Gun" type="Node2D" parent="."]
position = Vector2(1, 1)

[node name="Marker2D" type="Marker2D" parent="Gun"]
position = Vector2(85, 33)

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Gun"]
stream = ExtResource("4_m3gyy")
volume_db = -20.0
max_polyphony = 2

[node name="GPUParticles2D2" type="GPUParticles2D" parent="."]
position = Vector2(-58, -16)
amount = 500
amount_ratio = 0.66
process_material = SubResource("ParticleProcessMaterial_xtmdc")
lifetime = 5.0

[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(7, 16)
scale = Vector2(0.12, 0.12)
texture = ExtResource("3_5g2vf")

[node name="WallCollider" type="CollisionShape2D" parent="."]
position = Vector2(4, 7)
shape = SubResource("RectangleShape2D_u1ywu")

[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
position = Vector2(-70, -10)
amount = 500
amount_ratio = 0.66
process_material = SubResource("ParticleProcessMaterial_xtmdc")
lifetime = 5.0

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_vkafp")
}

[node name="ColorRect" type="ColorRect" parent="."]
offset_left = -5000.0
offset_top = -5000.0
offset_right = 5000.0
offset_bottom = 5000.0
color = Color(0, 0, 0, 0)

[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
