[gd_scene load_steps=12 format=2]

[ext_resource path="res://Assets/Player/Player.png" type="Texture" id=1]
[ext_resource path="res://Scenes/Player/Player.gd" type="Script" id=2]
[ext_resource path="res://DebugKinematicBody2D.tscn" type="PackedScene" id=3]
[ext_resource path="res://Scenes/Player/PlayerGun.tscn" type="PackedScene" id=4]
[ext_resource path="res://Scenes/Objects/Hurtbox.tscn" type="PackedScene" id=5]
[ext_resource path="res://Scenes/Player/PlayerCollider.tres" type="Shape2D" id=6]

[sub_resource type="Animation" id=1]
resource_name = "Idle"
length = 1.2
loop = true
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.3, 0.6, 0.9 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3 ]
}

[sub_resource type="Animation" id=2]
resource_name = "Jump"
length = 0.1
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": 1,
"values": [ 11 ]
}

[sub_resource type="Animation" id=3]
resource_name = "Run"
length = 0.6
loop = true
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.1, 0.2, 0.3, 0.4, 0.5, 0.6 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 4, 5, 6, 7, 8, 9, 7 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.3, 0.6 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [  ],
"method": "create_dust_effect"
}, {
"args": [  ],
"method": "create_dust_effect"
} ]
}

[sub_resource type="Animation" id=4]
resource_name = "WallSlide"
length = 0.1
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": 1,
"values": [ 10 ]
}

[sub_resource type="Animation" id=5]
length = 0.9
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ false, true, false, true, false, true, false, true, false, true ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.9 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ true ],
"method": "set_invincible"
}, {
"args": [ false ],
"method": "set_invincible"
} ]
}

[node name="Player" type="KinematicBody2D"]
collision_mask = 2
script = ExtResource( 2 )

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -12 )
texture = ExtResource( 1 )
hframes = 12
frame = 11

[node name="PlayerGun" parent="Sprite" instance=ExtResource( 4 )]
show_behind_parent = true
position = Vector2( 1, 3 )

[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2( 0, -7 )
shape = ExtResource( 6 )

[node name="Animation" type="AnimationPlayer" parent="."]
anims/Idle = SubResource( 1 )
anims/Jump = SubResource( 2 )
anims/Run = SubResource( 3 )
anims/WallSlide = SubResource( 4 )

[node name="BlinkAnimator" type="AnimationPlayer" parent="."]
anims/Blink = SubResource( 5 )

[node name="Debug" parent="." instance=ExtResource( 3 )]
visible = false

[node name="CameraFollow" type="RemoteTransform2D" parent="."]
position = Vector2( 0, -8 )
update_rotation = false
update_scale = false

[node name="CoyoteJumpTimer" type="Timer" parent="."]
wait_time = 0.2
one_shot = true

[node name="FireBulletTimer" type="Timer" parent="."]
wait_time = 0.3
one_shot = true

[node name="Hurtbox" parent="." instance=ExtResource( 5 )]
collision_layer = 4

[node name="Collider" parent="Hurtbox" index="0"]
position = Vector2( 0, -7 )
shape = ExtResource( 6 )

[node name="InvincibleTimer" type="Timer" parent="."]

[node name="PowerupDetector" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 32

[node name="Collision" type="CollisionShape2D" parent="PowerupDetector"]
position = Vector2( 0, -7 )
shape = ExtResource( 6 )

[connection signal="hit" from="Hurtbox" to="." method="_on_Hurtbox_hit"]
[connection signal="area_entered" from="PowerupDetector" to="." method="_on_PowerupDetector_area_entered"]

[editable path="Hurtbox"]
