Zombie animation now supports timescale

This commit is contained in:
Rendo 2025-07-07 23:27:36 +05:00
commit df940e2ba6
3 changed files with 28 additions and 7 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=46 format=3 uid="uid://bgqmwsb6ynm81"]
[gd_scene load_steps=48 format=3 uid="uid://bgqmwsb6ynm81"]
[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"]
[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_6qr4h"]
@ -152,6 +152,8 @@ _data = {
&"run": SubResource("Animation_5selg")
}
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"]
animation = &"basic_zombie/eat"
@ -219,7 +221,15 @@ states/hobo_zombie_can_destroy/position = Vector2(368, 206)
states/hobo_zombie_run/node = SubResource("AnimationNodeAnimation_c1y3b")
states/hobo_zombie_run/position = Vector2(866, 89)
transitions = ["Start", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "basic_zombie_idle", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "basic_zombie_walk", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "basic_zombie_idle", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_qg8rq"), "basic_zombie_idle", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_4248q"), "hobo_zombie_run", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_tu6af"), "basic_zombie_eat", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_yalvk"), "hobo_zombie_can_destroy", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_7jlle"), "basic_zombie_eat", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_w1b1s"), "basic_zombie_walk", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_02fim")]
graph_offset = Vector2(55, -28)
graph_offset = Vector2(210, 91)
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_txjqc"]
graph_offset = Vector2(-447, 53)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d")
nodes/TimeScale/position = Vector2(60, 120)
nodes/Tree/node = SubResource("AnimationNodeStateMachine_xg3p6")
nodes/Tree/position = Vector2(-220, 120)
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="Resource" id="Resource_4248q"]
resource_local_to_scene = true
@ -277,7 +287,7 @@ autoplay = "baisc_zombie/walk"
speed_scale = 3.0
[node name="AnimationTree" parent="." index="4"]
tree_root = SubResource("AnimationNodeStateMachine_xg3p6")
tree_root = SubResource("AnimationNodeBlendTree_txjqc")
advance_expression_base_node = NodePath("../Behaviour")
[node name="Mover" parent="." index="5"]
@ -285,6 +295,7 @@ _speed = SubResource("Resource_4248q")
[node name="CanArmor" type="Node" parent="." index="7"]
script = ExtResource("4_w8pya")
MaxHP = 385.0
metadata/_custom_type_script = "uid://fd4im1fmwc5n"
[node name="Behaviour" type="Node" parent="." index="8" node_paths=PackedStringArray("_eatBox", "_animationTree")]