[gd_scene load_steps=10 format=2]

[ext_resource path="res://textures/enemies/fist_monster.png" type="Texture" id=1]
[ext_resource path="res://objects/enemies/fist/Fist.gd" type="Script" id=2]
[ext_resource path="res://objects/enemies/fist/KinematicBody.gd" type="Script" id=3]
[ext_resource path="res://textures/enemies/bossbar.png" type="Texture" id=4]

[sub_resource type="BoxShape" id=1]
extents = Vector3( 20, 2, 60 )

[sub_resource type="BoxShape" id=2]
extents = Vector3( 1.5, 1.577, 4.5 )

[sub_resource type="BoxShape" id=3]
extents = Vector3( 1.35, 0.295, 4 )

[sub_resource type="Animation" id=4]
resource_name = "awaken"
length = 0.7
tracks/0/type = "bezier"
tracks/0/path = NodePath("KinematicBody:translation:y")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"points": PoolRealArray( 0, -0.25, 0, 0.25, 0, 3, -0.25, 0, 0.25, 0 ),
"times": PoolRealArray( 0, 0.7 )
}

[sub_resource type="Animation" id=5]
length = 2.9
tracks/0/type = "bezier"
tracks/0/path = NodePath("KinematicBody:translation:y")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"points": PoolRealArray( 3, -0.25, 0, 0.25, 0, 3.8, -0.25, 0, 0.25, 0, -0.5, -0.25, 0, 0.25, 0, -0.5, -0.25, 0, 0.25, 0, 3, -0.25, 0, 0.25, 0 ),
"times": PoolRealArray( 0, 0.4, 1, 1.7, 2.9 )
}
tracks/1/type = "value"
tracks/1/path = NodePath(".:make_shockwave")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1, 1.7 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}

[node name="Fist" type="Spatial" groups=[
"entity",
"fist",
]]
pause_mode = 1
transform = Transform( 3, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0 )
script = ExtResource( 2 )

[node name="KinematicBody" type="KinematicBody" parent="." groups=[
"fist",
]]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0 )
script = ExtResource( 3 )

[node name="Healthbar" type="Sprite3D" parent="KinematicBody"]
transform = Transform( 5, 0, 0, 0, 0.5, 0, 0, 0, 1, 0, 2.24464, 0 )
visible = false
billboard = 1
texture = ExtResource( 4 )

[node name="Aggro" type="Area" parent="KinematicBody" groups=[
"fist",
]]

[node name="CollisionShape" type="CollisionShape" parent="KinematicBody/Aggro"]
shape = SubResource( 1 )

[node name="Sprite3D" type="Sprite3D" parent="KinematicBody"]
billboard = 2
texture = ExtResource( 1 )

[node name="CollisionShape" type="CollisionShape" parent="KinematicBody"]
shape = SubResource( 2 )

[node name="Attack" type="Area" parent="KinematicBody" groups=[
"fist",
]]

[node name="CollisionShape" type="CollisionShape" parent="KinematicBody/Attack"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.52421, 0 )
shape = SubResource( 3 )

[node name="Spawner" type="Position3D" parent="KinematicBody"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.6503, 0 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/awaken = SubResource( 4 )
anims/slam = SubResource( 5 )

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

[node name="MoveTimer" type="Timer" parent="."]
wait_time = 2.0
autostart = true

[node name="Hurt" type="AudioStreamPlayer3D" parent="."]
unit_db = 6.0
unit_size = 10.0

[connection signal="body_entered" from="KinematicBody/Aggro" to="." method="_on_Aggro_body_entered"]
[connection signal="body_entered" from="KinematicBody/Attack" to="." method="_on_Attack_body_entered"]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="timeout" from="CrabheadSpawned" to="." method="_on_CrabheadSpawned_timeout"]
[connection signal="timeout" from="MoveTimer" to="." method="_on_MoveTimer_timeout"]
