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

[ext_resource type="Script" uid="uid://c7gns73bldktx" path="res://scripts/enemies/slime.gd" id="1_4h4y0"]
[ext_resource type="Texture2D" uid="uid://b6krbvbco0jt6" path="res://textures/shadow.png" id="2_b58ev"]
[ext_resource type="Texture2D" uid="uid://b8sc3vq5pmwil" path="res://textures/slime.png" id="3_ankfk"]

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_0tnpc"]
radius = 0.25
height = 0.5

[sub_resource type="Animation" id="Animation_0tnpc"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Body:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}

[sub_resource type="Animation" id="Animation_vtaks"]
resource_name = "idle"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(1, 1, 1), Vector3(1, 0.8, 1), Vector3(1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Body:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -0.03, 0), Vector3(0, 0, 0)]
}

[sub_resource type="Animation" id="Animation_kvpfn"]
resource_name = "jump"
length = 0.6
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(1, 1, 1), Vector3(1.4, 0.6, 1), Vector3(0.7, 1.3, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Body:position")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5, 0.6),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -0.09, 0), Vector3(0, 0.05, 0)]
}

[sub_resource type="Animation" id="Animation_dinhu"]
resource_name = "leap"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0.03333336, 0.15, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0.7, 1.3, 1), Vector3(0.65, 1.35, 1), Vector3(0.7, 1.3, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Body:position")
tracks/1/interp = 2
tracks/1/loop_wrap = false
tracks/1/keys = {
"times": PackedFloat32Array(0.03333336),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0.05, 0)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_kvuet"]
_data = {
&"RESET": SubResource("Animation_0tnpc"),
&"idle": SubResource("Animation_vtaks"),
&"jump": SubResource("Animation_kvpfn"),
&"leap": SubResource("Animation_dinhu")
}

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vtaks"]
radius = 0.2
height = 0.4

[node name="Slime" type="CharacterBody3D" unique_id=393738189]
collision_layer = 2
collision_mask = 2
script = ExtResource("1_4h4y0")

[node name="Shadow" type="Sprite3D" parent="." unique_id=538719324]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0)
modulate = Color(1, 1, 1, 0.5764706)
pixel_size = 0.03
axis = 1
texture_filter = 0
texture = ExtResource("2_b58ev")

[node name="Collision" type="CollisionShape3D" parent="." unique_id=1791576244]
shape = SubResource("CapsuleShape3D_0tnpc")

[node name="Floorcast" type="RayCast3D" parent="." unique_id=216872080]
target_position = Vector3(0, -16, 0)

[node name="Body" type="Sprite3D" parent="." unique_id=1136011871]
pixel_size = 0.03
shaded = true
texture_filter = 0
texture = ExtResource("3_ankfk")

[node name="Animator" type="AnimationPlayer" parent="Body" unique_id=823259126]
root_node = NodePath("../..")
libraries/ = SubResource("AnimationLibrary_kvuet")

[node name="HitCollision" type="Area3D" parent="." unique_id=897519833]

[node name="Collision" type="CollisionShape3D" parent="HitCollision" unique_id=66683269]
shape = SubResource("CapsuleShape3D_vtaks")
debug_color = Color(0.9020641, 0, 0.13776582, 0.41960785)
