fix state and make animations loop, refactoring animals ai
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://c2hg6hu2y5srb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://clx701xdwelgx" path="res://core/ai/agents/base/ai_base.tscn" id="1_j8spt"]
|
||||
[ext_resource type="Script" uid="uid://d3hy70ec8vqo5" path="res://core/ai/framework/run_animation_state.gd" id="2_acc6o"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0xb7kl4rjd66" path="res://core/ai/agents/pig/pig_mannequin.tscn" id="2_qmc2e"]
|
||||
[ext_resource type="Animation" uid="uid://cneiflmpalcg5" path="res://core/ai/agents/pig/idle.res" id="3_lvpc5"]
|
||||
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_3n8ak"]
|
||||
[ext_resource type="Animation" uid="uid://c4ingpw0co8v2" path="res://core/ai/agents/pig/idle.res" id="3_lvpc5"]
|
||||
[ext_resource type="Animation" uid="uid://0563r715lmw1" path="res://core/ai/agents/pig/walking.res" id="4_3f3hl"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_lvpc5"]
|
||||
@@ -24,10 +26,26 @@ visible = false
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.24243164, 0.10699463)
|
||||
shape = SubResource("BoxShape3D_lvpc5")
|
||||
|
||||
[node name="StateMachine" parent="." index="3" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
|
||||
initial_state = NodePath("IdleState")
|
||||
|
||||
[node name="IdleState" type="Node" parent="StateMachine" index="0" unique_id=403305255]
|
||||
script = ExtResource("2_acc6o")
|
||||
state_id = &"idle"
|
||||
next_state_id = &"patrol"
|
||||
animation_name = "custom/idle"
|
||||
|
||||
[node name="PatrolState" type="Node" parent="StateMachine" index="1" unique_id=1237150984]
|
||||
script = ExtResource("3_3n8ak")
|
||||
state_id = &"patrol"
|
||||
next_state_id = &"idle"
|
||||
animation_name = "custom/walking"
|
||||
exit_on_action_finished = true
|
||||
|
||||
[node name="PigMannequin" parent="." index="5" unique_id=926755470 instance=ExtResource("2_qmc2e")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.9, 0)
|
||||
|
||||
[node name="Skeleton3D" parent="PigMannequin/Armature" parent_id_path=PackedInt32Array(926755470, 1135672511) index="0" unique_id=689596368]
|
||||
[node name="Skeleton3D" parent="PigMannequin/Armature" parent_id_path=PackedInt32Array(926755470, 695496535) index="0" unique_id=725647261]
|
||||
bones/1/rotation = Quaternion(0.7071068, -7.052583e-07, -7.052583e-07, 0.7071067)
|
||||
bones/3/position = Vector3(5.37765e-05, 0.017809996, -0.007695386)
|
||||
bones/3/rotation = Quaternion(-0.027121998, 0, 0, 0.99963224)
|
||||
@@ -62,7 +80,7 @@ bones/31/rotation = Quaternion(0.7071068, -1.0424332e-06, -1.0424329e-06, 0.7071
|
||||
bones/33/position = Vector3(0.010670463, 0.0010000349, -0.03166372)
|
||||
bones/33/rotation = Quaternion(0.70755845, -7.1388774e-07, -1.0355643e-06, 0.7066547)
|
||||
|
||||
[node name="AnimationPlayer" parent="PigMannequin" index="1" unique_id=1348500176]
|
||||
[node name="AnimationPlayer" parent="PigMannequin" index="1" unique_id=904091745]
|
||||
libraries/custom = SubResource("AnimationLibrary_lvpc5")
|
||||
|
||||
[editable path="PigMannequin"]
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user