[gd_scene load_steps=15 format=2]

[ext_resource path="res://assets/art/player/bullet/bullet.png" type="Texture" id=1]
[ext_resource path="res://assets/audio/sfx/explode.wav" type="AudioStream" id=2]
[ext_resource path="res://assets/audio/sfx/hit.wav" type="AudioStream" id=3]
[ext_resource path="res://assets/art/enemy/enemy.png" type="Texture" id=4]
[ext_resource path="res://src/Actors/Enemy.gd" type="Script" id=5]

[sub_resource type="CanvasItemMaterial" id=1]

[sub_resource type="Animation" id=2]
resource_name = "destroy"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 7 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.8 ),
"transitions": PoolRealArray( 0.0796601, 1 ),
"update": 0,
"values": [ 0.0, 180.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Sprite:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.5, 1.1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("Explosion:emitting")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ false, true ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("Explosion:process_material:scale")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0.6, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 1.0, 4.0 ]
}
tracks/5/type = "value"
tracks/5/path = NodePath("Hit:playing")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/keys = {
"times": PoolRealArray( 0.00999999 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/6/type = "value"
tracks/6/path = NodePath("Explode:playing")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/keys = {
"times": PoolRealArray( 0.8 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/7/type = "method"
tracks/7/path = NodePath(".")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "queue_free"
} ]
}
tracks/8/type = "value"
tracks/8/path = NodePath(".:collision_layer")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}
tracks/9/type = "value"
tracks/9/path = NodePath("Sprite:position")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/keys = {
"times": PoolRealArray( 0, 0.2, 0.4 ),
"transitions": PoolRealArray( 2.2974, 0.183011, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, -32 ), Vector2( 0, 0 ) ]
}

[sub_resource type="Animation" id=3]
length = 6.75
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ]
}

[sub_resource type="Animation" id=4]
length = 1.25
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3, 4, 0 ]
}

[sub_resource type="CapsuleShape2D" id=5]
radius = 11.0
height = 7.0

[sub_resource type="CanvasItemMaterial" id=6]
blend_mode = 1

[sub_resource type="Gradient" id=7]
offsets = PoolRealArray( 0.5, 1 )
colors = PoolColorArray( 1, 1, 1, 1, 0, 0, 0, 1 )

[sub_resource type="GradientTexture" id=8]
gradient = SubResource( 7 )
width = 256

[sub_resource type="ParticlesMaterial" id=9]
emission_shape = 1
emission_sphere_radius = 8.0
flag_disable_z = true
spread = 180.0
gravity = Vector3( 0, 250, 0 )
initial_velocity = 120.0
initial_velocity_random = 0.5
orbit_velocity = 0.0
orbit_velocity_random = 0.0
angle_random = 1.0
scale_random = 1.0
color_ramp = SubResource( 8 )
hue_variation = 0.05
hue_variation_random = 0.46

[node name="Enemy" type="KinematicBody2D"]
collision_layer = 2
collision_mask = 24
script = ExtResource( 5 )
speed = Vector2( 75, 250 )

[node name="PlatformDetector" type="RayCast2D" parent="."]
position = Vector2( 0, 6 )
enabled = true
cast_to = Vector2( 0, 8 )
collision_mask = 8

[node name="FloorDetectorLeft" type="RayCast2D" parent="."]
position = Vector2( -15, -4 )
enabled = true
cast_to = Vector2( 0, 35 )
collision_mask = 24

[node name="FloorDetectorRight" type="RayCast2D" parent="."]
position = Vector2( 15.5, -3 )
enabled = true
cast_to = Vector2( 0, 35 )
collision_mask = 24

[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 1 )
texture = ExtResource( 4 )
flip_h = true
hframes = 8
frame = 7

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/destroy = SubResource( 2 )
anims/idle = SubResource( 3 )
anims/walk = SubResource( 4 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = -1.5708
shape = SubResource( 5 )

[node name="Explosion" type="Particles2D" parent="."]
self_modulate = Color( 1, 1, 1, 0.12 )
material = SubResource( 6 )
emitting = false
amount = 32
lifetime = 0.5
one_shot = true
speed_scale = 1.2
explosiveness = 0.76
draw_order = 215832976
process_material = SubResource( 9 )
texture = ExtResource( 1 )

[node name="Hit" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )

[node name="Explode" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 2 )
