[gd_scene load_steps=14 format=2]

[ext_resource path="res://objects/player/Player.gd" type="Script" id=1]
[ext_resource path="res://sprites/player/Player_SpriteFrames.tres" type="SpriteFrames" id=2]
[ext_resource path="res://sprites/player/other/ambient_chest.png" type="Texture" id=3]
[ext_resource path="res://sprites/player/other/ambient_eye.png" type="Texture" id=4]
[ext_resource path="res://sprites/player/other/Flashlight.png" type="Texture" id=5]
[ext_resource path="res://sprites/objects/helditems/heldflask.png" type="Texture" id=6]
[ext_resource path="res://sprites/player/shadow/ShadowIdleDown.png" type="Texture" id=10]
[ext_resource path="res://sprites/player/shadow/ShadowIdleRight.png" type="Texture" id=19]

[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 19 ) ],
"loop": true,
"name": "idleright",
"speed": 5.0
}, {
"frames": [ ExtResource( 10 ) ],
"loop": true,
"name": "idledown",
"speed": 5.0
} ]

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 5.5, 4 )

[sub_resource type="ParticlesMaterial" id=3]
emission_shape = 1
emission_sphere_radius = 5.0
flag_disable_z = true
gravity = Vector3( 0, 15, 0 )
orbit_velocity = 0.0
orbit_velocity_random = 0.0
linear_accel = 5.0
radial_accel = 50.0
radial_accel_random = 1.0
color = Color( 0, 0, 0, 0.65098 )

[sub_resource type="Animation" id=4]
resource_name = "IdleRight"
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
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": [ Vector2( 1, -20 ) ]
}

[sub_resource type="Animation" id=5]
length = 0.32
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.17, 0.33 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ Vector2( 1, -20 ), Vector2( 1, -19 ), Vector2( 1, -20 ) ]
}

[node name="Player" type="KinematicBody2D" groups=[
"player",
]]
position = Vector2( 0, -2 )
script = ExtResource( 1 )

[node name="Shadow" type="AnimatedSprite" parent="."]
position = Vector2( -10, -24 )
frames = SubResource( 1 )
animation = "idledown"
centered = false

[node name="Anim" type="AnimatedSprite" parent="."]
position = Vector2( 0, -9 )
frames = ExtResource( 2 )
animation = "throwright"

[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2( 0.5, 1 )
shape = SubResource( 2 )

[node name="WallTimer" type="Timer" parent="."]
one_shot = true

[node name="WallCheck" type="RayCast2D" parent="."]
position = Vector2( 0, 1 )
enabled = true
cast_to = Vector2( 0, 4 )

[node name="Interact" type="RayCast2D" parent="."]
position = Vector2( 0, -2 )
enabled = true
cast_to = Vector2( 0, 30 )

[node name="WallCast1" type="RayCast2D" parent="."]
position = Vector2( -5, 5 )
cast_to = Vector2( 0, 6 )

[node name="WallCast2" type="RayCast2D" parent="."]
position = Vector2( 6, 5 )
cast_to = Vector2( 0, 6 )

[node name="RollTimer" type="Timer" parent="."]
one_shot = true

[node name="RollCooldown" type="Timer" parent="."]
one_shot = true

[node name="Timers" type="Node" parent="."]

[node name="SkidTimer" type="Timer" parent="Timers"]
one_shot = true

[node name="RegenTimer" type="Timer" parent="Timers"]
wait_time = 1.5
autostart = true

[node name="BonkTimer" type="Timer" parent="Timers"]
one_shot = true

[node name="GroundParticles" type="Node2D" parent="."]
z_index = -1

[node name="SkidParticles" type="Particles2D" parent="GroundParticles"]
visible = false
amount = 16
lifetime = 0.5
explosiveness = 0.05
process_material = SubResource( 3 )

[node name="AmbientLight" type="Node2D" parent="."]
visible = false

[node name="AmbientEye1" type="Light2D" parent="AmbientLight"]
position = Vector2( -2, -14 )
texture = ExtResource( 4 )
color = Color( 0.14902, 0, 1, 1 )

[node name="AmbientEye2" type="Light2D" parent="AmbientLight"]
position = Vector2( 3, -14 )
texture = ExtResource( 4 )
color = Color( 0.14902, 0, 1, 1 )

[node name="AmbientChest" type="Light2D" parent="AmbientLight"]
position = Vector2( 0, -8 )
texture = ExtResource( 3 )
offset = Vector2( 0.5, 0.5 )
color = Color( 0.14902, 0, 1, 1 )

[node name="Flashlight" type="Light2D" parent="."]
position = Vector2( 0, -7 )
texture = ExtResource( 5 )
energy = 0.9
mode = 2

[node name="helditem" type="Position2D" parent="."]
position = Vector2( 1, -20 )

[node name="Sprite" type="Sprite" parent="helditem"]
visible = false
texture = ExtResource( 6 )

[node name="Anim" type="AnimationPlayer" parent="helditem"]
anims/IdleRight = SubResource( 4 )
anims/WalkRight = SubResource( 5 )
[connection signal="timeout" from="WallTimer" to="." method="_on_WallTimer_timeout"]
[connection signal="timeout" from="RollTimer" to="." method="_on_RollTimer_timeout"]
[connection signal="timeout" from="RollCooldown" to="." method="_on_RollCooldown_timeout"]
[connection signal="timeout" from="Timers/SkidTimer" to="." method="_on_SkidTimer_timeout"]
[connection signal="timeout" from="Timers/RegenTimer" to="." method="_on_RegenTimer_timeout"]
[connection signal="timeout" from="Timers/BonkTimer" to="." method="_on_BonkTimer_timeout"]
