[gd_scene load_steps=43 format=2]

[ext_resource path="res://lib/parent_scenes/actor.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/actors/players/playerE/PlayerE_SpriteFrames.tres" type="SpriteFrames" id=2]
[ext_resource path="res://src/actors/players/playerE/PlayerE.gd" type="Script" id=3]
[ext_resource path="res://src/actors/players/playerE/states/idle.tres" type="Resource" id=4]
[ext_resource path="res://src/actors/players/playerE/PlayerE-AnimatedSprite_StateReceiver.gd" type="Script" id=5]
[ext_resource path="res://src/actors/players/playerE/PlayerE-Movement_StateReceiver.gd" type="Script" id=6]
[ext_resource path="res://src/actors/players/playerE/states/move.tres" type="Resource" id=7]
[ext_resource path="res://src/actors/players/playerE/states/jump.tres" type="Resource" id=8]
[ext_resource path="res://src/actors/players/playerE/states/fall.tres" type="Resource" id=9]
[ext_resource path="res://src/actors/players/playerE/states/attack_sword.tres" type="Resource" id=10]
[ext_resource path="res://src/actors/players/playerE/states/attack_shoot.tres" type="Resource" id=11]
[ext_resource path="res://src/actors/players/playerE/states/land.tres" type="Resource" id=12]
[ext_resource path="res://src/actors/players/playerE/states/roll.tres" type="Resource" id=13]
[ext_resource path="res://src/actors/players/playerE/states/crouch.tres" type="Resource" id=14]
[ext_resource path="res://src/actors/players/playerE/states/crouch_move.tres" type="Resource" id=15]
[ext_resource path="res://lib/components/Hurtbox_Component.tscn" type="PackedScene" id=16]
[ext_resource path="res://lib/components/Health_Component.tscn" type="PackedScene" id=17]
[ext_resource path="res://lib/classes/state_animated_actor.gd" type="Script" id=18]
[ext_resource path="res://src/actors/players/playerE/states/ledge_grab.tres" type="Resource" id=19]
[ext_resource path="res://src/actors/players/playerE/states/ledge_climb.tres" type="Resource" id=20]
[ext_resource path="res://lib/templates/Interactable/Interactable_Receiver.gd" type="Script" id=21]
[ext_resource path="res://src/actors/players/playerE/states/enter_right.tres" type="Resource" id=22]
[ext_resource path="res://src/actors/players/playerE/states/climb.tres" type="Resource" id=23]
[ext_resource path="res://lib/classes/sound_effect_state_frame.gd" type="Script" id=24]
[ext_resource path="res://assets_tmp/SE/tap.wav" type="AudioStream" id=25]
[ext_resource path="res://assets_tmp/SE/land.wav" type="AudioStream" id=26]
[ext_resource path="res://src/actors/players/playerE/states/attack_punch.tres" type="Resource" id=27]
[ext_resource path="res://src/components/PewMachine.tscn" type="PackedScene" id=28]
[ext_resource path="res://lib/components/Stamina_Component.tscn" type="PackedScene" id=29]
[ext_resource path="res://src/actors/players/playerE/states/death.tres" type="Resource" id=30]
[ext_resource path="res://src/actors/players/playerE/PlayerE-CollisionShape2D_StateReceiver.gd" type="Script" id=31]
[ext_resource path="res://src/actors/players/playerE/Hitbox-CollisionShape2D_StateReceiver.gd" type="Script" id=32]
[ext_resource path="res://lib/components/Hitbox_Component.tscn" type="PackedScene" id=33]
[ext_resource path="res://src/actors/players/playerE/Hurtbox-CollisionShape2D_StateReceiver.gd" type="Script" id=34]
[ext_resource path="res://lib/components/Modifier_Receiver.tscn" type="PackedScene" id=35]

[sub_resource type="Resource" id=3]
resource_local_to_scene = true
resource_name = "hurt"
script = ExtResource( 18 )
debug_state = false
timeout_seconds = 2.0
name = "hurt"
speed_start = Vector2( 20, 1.36422e-12 )
speed_end = Vector2( 20, 1000 )
acceleration = Vector2( 0, 280 )
jerk_factor = Vector2( 1, 1 )
horizontal_speed = 20.0
horizontal_acceleration = 0.0
horizontal_speed_offset = 0.0
horizontal_speed_offset_acceleration = 0.0
vertical_speed = 0.0
vertical_acceleration = 0.0
vertical_speed_offset = 0.0
vertical_speed_offset_acceleration = 0.0
horizontal_jerk_factor = 1.0
vertical_jerk_factor = 1.0
preserve_inertia = true
is_grounded = true
animation_sequence = [ "hurt" ]

[sub_resource type="Resource" id=4]
script = ExtResource( 24 )
state_name = "move"
frame_number = 0
sound_effect_type = 0
sound = ExtResource( 25 )

[sub_resource type="Resource" id=5]
script = ExtResource( 24 )
state_name = "move"
frame_number = 4
sound_effect_type = 0
sound = ExtResource( 25 )

[sub_resource type="Resource" id=6]
script = ExtResource( 24 )
state_name = "land"
frame_number = 0
sound_effect_type = 0
sound = ExtResource( 26 )

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7, 14 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 9, 15 )

[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 4, 3 )

[node name="PlayerE" instance=ExtResource( 1 )]
script = ExtResource( 3 )
actor_type = "Player"
player_number = 1

[node name="Movement_StateMachine" parent="." index="0"]
debug_state_machine = true
starting_state_name = "idle"
states = [ ExtResource( 4 ), ExtResource( 9 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 12 ), ExtResource( 11 ), ExtResource( 10 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), SubResource( 3 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 27 ), ExtResource( 30 ) ]

[node name="AnimatedSprite_StateReceiver" parent="." index="1"]
frames = ExtResource( 2 )
animation = "attack-punch"
frame = 7
script = ExtResource( 5 )
__meta__ = {
"_aseprite_wizard_config_": {
"layer": "",
"o_ex_p": "-.*",
"o_folder": "res://assets/actors/players/playerE",
"o_name": "run-shoot",
"only_visible": true,
"op_exp": true,
"sf_name": "PlayerE_SpriteFrames",
"slice": "",
"source": "/home/relay01/Assets/Library/Asset Packs 1-5/Asset Packs 1-4 (final)/Asset Pack-V4/Player Running Shooting-Running Aiming/Player Running Shooting and Running Aiming 48x48.aseprite"
}
}

[node name="Movement_StateReceiver" parent="." index="2"]
script = ExtResource( 6 )

[node name="Modifier_Receiver" parent="." index="3" instance=ExtResource( 35 )]
callable_state_machine = NodePath("../Movement_StateMachine")
debug_receiver = true

[node name="LedgeDetector" type="RayCast2D" parent="." index="4"]
unique_name_in_owner = true
modulate = Color( 0, 1, 0, 1 )
position = Vector2( 8, -10 )
enabled = true
cast_to = Vector2( 1.36422e-12, -1 )

[node name="WallDetector" type="RayCast2D" parent="." index="5"]
unique_name_in_owner = true
modulate = Color( 0, 1, 0, 1 )
position = Vector2( 6, -16 )
enabled = true
cast_to = Vector2( 4, 4 )

[node name="LadderDetector" type="RayCast2D" parent="." index="6"]
unique_name_in_owner = true
modulate = Color( 0, 1, 0, 1 )
enabled = true
cast_to = Vector2( 1.36422e-12, 20 )
collision_mask = 1024
collide_with_areas = true
collide_with_bodies = false

[node name="AudioStreamPlayer_StateReceiver" parent="." index="7"]
sound_effects = [ SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ]

[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="8"]
position = Vector2( 0, 2 )
shape = SubResource( 1 )
script = ExtResource( 31 )
callable_state_machine = NodePath("../Movement_StateMachine")

[node name="Health_Component" parent="." index="9" instance=ExtResource( 17 )]
unique_name_in_owner = true
max_health = 100

[node name="Stamina_Component" parent="." index="10" instance=ExtResource( 29 )]
unique_name_in_owner = true
max_stamina = 50
recovery_rate = 2

[node name="Hurtbox_Component" parent="." index="11" instance=ExtResource( 16 )]
collision_layer = 16
collision_mask = 128
hurtbox_entered_function = "hit_Receiver"

[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox_Component" index="0"]
modulate = Color( 0, 0, 1, 1 )
position = Vector2( -1, 2 )
shape = SubResource( 2 )
script = ExtResource( 34 )
callable_state_machine = NodePath("../../Movement_StateMachine")

[node name="Interactable_Receiver" type="Node" parent="." index="12"]
script = ExtResource( 21 )
interactable_parent_callback = "touch_the_thing"

[node name="PewMachine" parent="." index="13" instance=ExtResource( 28 )]

[node name="Hitbox_Component" parent="." index="14" instance=ExtResource( 33 )]
collision_layer = 192
damage_amount = 10

[node name="CollisionShape2D_StateReceiver" type="CollisionShape2D" parent="Hitbox_Component" index="0"]
modulate = Color( 1, 0, 0, 1 )
position = Vector2( 0, 8 )
shape = SubResource( 7 )
disabled = true
script = ExtResource( 32 )
callable_state_machine = NodePath("../../Movement_StateMachine")
disable_shape_when_no_state_function = true

[connection signal="state_changed" from="Movement_StateMachine" to="." method="_on_Movement_StateMachine_state_changed"]
[connection signal="health_depleted" from="Health_Component" to="." method="_on_Health_Component_health_depleted"]
