[gd_scene load_steps=57 format=3 uid="uid://d2xgp0scnb5s3"]

[ext_resource type="Script" uid="uid://cxcuos53tbyxg" path="res://scripts/player.gd" id="1_aju6i"]
[ext_resource type="Texture2D" uid="uid://bsbojappb6j6v" path="res://sprites/characters/player.png" id="2_kypsj"]

[sub_resource type="AtlasTexture" id="AtlasTexture_3f3b5"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 384, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_4tw81"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 384, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_m7trn"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 384, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_uh8ab"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 384, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_yrhcf"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_3yswq"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_djsj2"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_2407h"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_36wye"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_mnubr"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 96, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_6qmk0"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_ssnjv"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_k2bhp"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_swgdr"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_juhbf"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_q4que"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 240, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_f4ot3"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 432, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_d6kmv"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 432, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_dspy3"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 432, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_ug60u"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 288, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_kk72y"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 288, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_gdiv8"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 288, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_i2nuk"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 288, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_e1ljg"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_bsnr0"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_c51yh"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_ql7gx"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_5n0ep"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_rlqlx"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 0, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_pr2xl"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_ac14o"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_hxltm"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_1rvf1"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_3wdef"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_bnl0y"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 144, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_qfhox"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 336, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_7yor4"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 336, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_xbeiq"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 336, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_3jviy"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 336, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_kaxc8"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_7uxwr"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_8c2hv"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_p3uww"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_smr0j"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_dsoy0"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 48, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_qopde"]
atlas = ExtResource("2_kypsj")
region = Rect2(0, 192, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_7f3kj"]
atlas = ExtResource("2_kypsj")
region = Rect2(48, 192, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_1crp1"]
atlas = ExtResource("2_kypsj")
region = Rect2(96, 192, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_4xcvp"]
atlas = ExtResource("2_kypsj")
region = Rect2(144, 192, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_8qbld"]
atlas = ExtResource("2_kypsj")
region = Rect2(192, 192, 48, 48)

[sub_resource type="AtlasTexture" id="AtlasTexture_apqjo"]
atlas = ExtResource("2_kypsj")
region = Rect2(240, 192, 48, 48)

[sub_resource type="SpriteFrames" id="SpriteFrames_tfyf1"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3f3b5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4tw81")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m7trn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uh8ab")
}],
"loop": true,
"name": &"back_attack",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_yrhcf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3yswq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_djsj2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2407h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_36wye")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mnubr")
}],
"loop": true,
"name": &"back_idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6qmk0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ssnjv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k2bhp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_swgdr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_juhbf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_q4que")
}],
"loop": true,
"name": &"back_walk",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_f4ot3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d6kmv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dspy3")
}],
"loop": true,
"name": &"death",
"speed": 5.0
}, {
"frames": [],
"loop": true,
"name": &"dodge",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ug60u")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kk72y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gdiv8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i2nuk")
}],
"loop": true,
"name": &"front_attack",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_e1ljg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bsnr0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c51yh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ql7gx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5n0ep")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rlqlx")
}],
"loop": true,
"name": &"front_idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pr2xl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ac14o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hxltm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1rvf1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3wdef")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bnl0y")
}],
"loop": true,
"name": &"front_walk",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qfhox")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7yor4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xbeiq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3jviy")
}],
"loop": true,
"name": &"side_attack",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_kaxc8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7uxwr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8c2hv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p3uww")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_smr0j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dsoy0")
}],
"loop": true,
"name": &"side_idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qopde")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7f3kj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1crp1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4xcvp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8qbld")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_apqjo")
}],
"loop": true,
"name": &"side_walk",
"speed": 5.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_oqexx"]
size = Vector2(9, 2)

[sub_resource type="CircleShape2D" id="CircleShape2D_fb3s1"]
radius = 15.0

[node name="Player" type="CharacterBody2D"]
y_sort_enabled = true
collision_layer = 3
script = ExtResource("1_aju6i")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_tfyf1")
animation = &"front_attack"
offset = Vector2(0, -17)

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0.5, 0)
shape = SubResource("RectangleShape2D_oqexx")

[node name="player_hitbox" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="player_hitbox"]
position = Vector2(0, -9)
shape = SubResource("CircleShape2D_fb3s1")

[node name="attack_cooldown" type="Timer" parent="."]
wait_time = 0.5

[node name="deal_attack_timer" type="Timer" parent="."]
wait_time = 0.5

[node name="healthbar" type="ProgressBar" parent="."]
modulate = Color(0.269061, 0.926059, 0.0858668, 1)
offset_left = -136.0
offset_top = -58.0
offset_right = 604.0
offset_bottom = 2.0
scale = Vector2(0.1, 0.1)
show_percentage = false

[node name="regen_timer" type="Timer" parent="."]
wait_time = 5.0
autostart = true

[node name="DodgeCoolDownBar" type="ProgressBar" parent="."]
modulate = Color(0.572139, 1.03481e-06, 0.217119, 1)
self_modulate = Color(1, 0, 1, 1)
offset_left = -136.0
offset_top = -30.0
offset_right = 604.0
offset_bottom = 30.0
scale = Vector2(0.1, 0.1)
max_value = 3.0
show_percentage = false

[node name="Camera2D" type="Camera2D" parent="."]
zoom = Vector2(5, 5)

[node name="RichTextLabel2" type="RichTextLabel" parent="."]
offset_left = -137.0
offset_top = -81.0
offset_right = -59.0
offset_bottom = -58.0
text = "Healthbar"
fit_content = true
scroll_active = false
autowrap_mode = 0

[node name="RichTextLabel" type="RichTextLabel" parent="."]
offset_left = -137.0
offset_top = -55.0
offset_right = -59.0
offset_bottom = -32.0
text = "Dodge"
fit_content = true
scroll_active = false
autowrap_mode = 0

[node name="TextEdit" type="TextEdit" parent="."]
visible = false
offset_left = -141.0
offset_top = 15.0
offset_right = 143.0
offset_bottom = 79.0
editable = false
wrap_mode = 1

[connection signal="body_entered" from="player_hitbox" to="." method="_on_player_hitbox_body_entered"]
[connection signal="body_exited" from="player_hitbox" to="." method="_on_player_hitbox_body_exited"]
[connection signal="timeout" from="attack_cooldown" to="." method="_on_attack_cooldown_timeout"]
[connection signal="timeout" from="deal_attack_timer" to="." method="_on_deal_attack_timer_timeout"]
[connection signal="timeout" from="regen_timer" to="." method="_on_regen_timer_timeout"]
