[gd_scene format=3 uid="uid://b51tkcnke32fs"]

[ext_resource type="Script" uid="uid://biwlcv6bb6x8g" path="res://player/player.gd" id="1_g1dw6"]
[ext_resource type="Texture2D" uid="uid://mq8hraseb0w4" path="res://player/sprites_anim_player.png" id="2_rgyib"]
[ext_resource type="PackedScene" uid="uid://c7c8fwn5ayhp4" path="res://state_machine/state_machine.tscn" id="2_rkbax"]
[ext_resource type="SpriteFrames" uid="uid://b1n7wx8q2wsqs" path="res://player/anim/sprite_frames_sombra.tres" id="3_hg6s5"]
[ext_resource type="AnimationLibrary" uid="uid://vo7wv2mtnd0l" path="res://player/anim/animaciones.res" id="4_8t03j"]
[ext_resource type="Script" uid="uid://bv88vgvr8qfyf" path="res://player/states/idle.gd" id="4_qjkh3"]
[ext_resource type="Script" uid="uid://j2pcey4aryhd" path="res://player/states/move.gd" id="5_g6k8r"]
[ext_resource type="Script" uid="uid://mkcalrf1gku1" path="res://player/states/attack.gd" id="6_g6k8r"]
[ext_resource type="Script" uid="uid://bl7udl8abou2u" path="res://player/states/hit.gd" id="9_hg6s5"]
[ext_resource type="AudioStream" uid="uid://nkki2ffwh1xv" path="res://player/axe hit 01.wav" id="10_ebec5"]
[ext_resource type="AudioStream" uid="uid://de553moowdqhp" path="res://player/axe hit 02.wav" id="11_yllr7"]
[ext_resource type="AudioStream" uid="uid://bs16n4fu6rwge" path="res://player/axe hit 03.wav" id="12_kb6p2"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_g1dw6"]
size = Vector2(42.5, 18.5)

[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_wodsf"]
streams_count = 3
stream_0/stream = ExtResource("10_ebec5")
stream_1/stream = ExtResource("11_yllr7")
stream_2/stream = ExtResource("12_kb6p2")

[sub_resource type="RectangleShape2D" id="RectangleShape2D_rgyib"]
size = Vector2(57.5, 20)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_hg6s5"]
size = Vector2(53.5, 39.5)

[node name="Player" type="CharacterBody2D" unique_id=804817431]
script = ExtResource("1_g1dw6")

[node name="sprites" type="Node2D" parent="." unique_id=1044118203]

[node name="jason" type="Sprite2D" parent="sprites" unique_id=480604386]
texture = ExtResource("2_rgyib")
centered = false
offset = Vector2(-58, -91)
hframes = 5
vframes = 4
frame = 2

[node name="sombra" type="AnimatedSprite2D" parent="sprites" unique_id=1345475661]
z_index = -1
y_sort_enabled = true
position = Vector2(-2, 0)
sprite_frames = ExtResource("3_hg6s5")
autoplay = "default"
frame_progress = 0.69394624

[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=17989738]
position = Vector2(0, -9)
shape = SubResource("RectangleShape2D_g1dw6")

[node name="animations" type="AnimationPlayer" parent="." unique_id=1529491777]
libraries/ = ExtResource("4_8t03j")
autoplay = &"idle"

[node name="state_machine" parent="." unique_id=1606864034 node_paths=PackedStringArray("starting_state") instance=ExtResource("2_rkbax")]
starting_state = NodePath("idle")

[node name="idle" type="Node" parent="state_machine" unique_id=734712115 node_paths=PackedStringArray("move_state", "attack_state")]
script = ExtResource("4_qjkh3")
move_state = NodePath("../move")
attack_state = NodePath("../attack")
animation_name = "idle"

[node name="move" type="Node" parent="state_machine" unique_id=817796163 node_paths=PackedStringArray("idle_state", "attack_state", "hit_state", "win_state", "lose_state")]
script = ExtResource("5_g6k8r")
idle_state = NodePath("../idle")
attack_state = NodePath("../attack")
hit_state = NodePath("../hit")
win_state = NodePath("../idle")
lose_state = NodePath("../idle")
animation_name = "move"

[node name="attack" type="Node" parent="state_machine" unique_id=51978206 node_paths=PackedStringArray("idle_state", "move_state", "win_state", "lose_state")]
script = ExtResource("6_g6k8r")
idle_state = NodePath("../idle")
move_state = NodePath("../move")
win_state = NodePath("../idle")
lose_state = NodePath("../idle")
animation_name = "attack"

[node name="hit" type="Node" parent="state_machine" unique_id=652264472 node_paths=PackedStringArray("idle_state", "win_state", "lose_state")]
script = ExtResource("9_hg6s5")
idle_state = NodePath("../idle")
win_state = NodePath("../idle")
lose_state = NodePath("../idle")
animation_name = "hit"

[node name="SFX" type="AudioStreamPlayer" parent="." unique_id=1755513181]
bus = &"SFX"

[node name="SFX_Hit" type="AudioStreamPlayer" parent="." unique_id=1445085444]
stream = SubResource("AudioStreamRandomizer_wodsf")
bus = &"SFX"

[node name="HitBoxHacha" type="Area2D" parent="." unique_id=32457418]

[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBoxHacha" unique_id=1854210494]
position = Vector2(40.25, -40)
shape = SubResource("RectangleShape2D_rgyib")
disabled = true
debug_color = Color(0.198699, 0.641507, 3.85046e-07, 0.419608)

[node name="AttackDuration" type="Timer" parent="." unique_id=701666187]
one_shot = true

[node name="HurtBox" type="Area2D" parent="." unique_id=1442729519]

[node name="CollisionShape2D" type="CollisionShape2D" parent="HurtBox" unique_id=618928292]
position = Vector2(-0.25, -22.25)
shape = SubResource("RectangleShape2D_hg6s5")
debug_color = Color(0.9994742, 0.011171436, 0.08261081, 0.41960785)

[connection signal="area_entered" from="HitBoxHacha" to="." method="_on_hit_box_hacha_area_entered"]
[connection signal="area_entered" from="HurtBox" to="." method="_on_hurt_box_area_entered"]
