zombie animation impl

This commit is contained in:
Rendo 2025-07-11 03:27:24 +05:00
commit 6c0730e1c9
14 changed files with 3173 additions and 215 deletions

View file

@ -1,12 +1,10 @@
[gd_scene load_steps=48 format=3 uid="uid://bgqmwsb6ynm81"]
[gd_scene load_steps=41 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"]
[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_txjqc"]
[ext_resource type="Texture2D" uid="uid://cse1504ao4g8e" path="res://assets/sprites/atlases/zombies/hobo.png" id="3_6qr4h"]
[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="3_b583s"]
[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/components/particles/FallParticle.cs" id="3_tu6af"]
[ext_resource type="AnimationLibrary" uid="uid://cuh2kyb21hmkm" path="res://resources/animations/zombies/basic_zombie.res" id="4_02fim"]
[ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/components/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"]
[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_c1y3b"]
[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/components/Armor.cs" id="4_w8pya"]
@ -44,130 +42,22 @@ flat_value = 10.0
percentage_value = 0.0
mult_value = 1.0
[sub_resource type="Animation" id="Animation_qv5y7"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasGroup/Sprite:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Mover:_speedControlMult")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sq25x"]
_data = {
&"RESET": SubResource("Animation_qv5y7")
}
[sub_resource type="Animation" id="Animation_w8pya"]
length = 2.0
tracks/0/type = "method"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mover")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(1.93333),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [3.0],
"method": &"SetSpeedMult"
}]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CanvasGroup/Sprite:self_modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 0, 0, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Mover:_speedControlMult")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0.0, 1.0]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("RipPlayer")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(1.96667),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Play"
}]
}
[sub_resource type="Animation" id="Animation_5selg"]
resource_name = "walk"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mover:_speedControlMult")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5selg"]
_data = {
&"can_destroy": SubResource("Animation_w8pya"),
&"run": SubResource("Animation_5selg")
}
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"]
animation = &"basic_zombie/eat"
animation = &"basic_zombie_eating"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nog33"]
animation = &"basic_zombie/idle"
animation = &"basic_zombie_stand"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g2uel"]
animation = &"basic_zombie/walk"
animation = &"basic_zombie_walk"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_02fim"]
animation = &"hobo_zombie/can_destroy"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_c1y3b"]
animation = &"hobo_zombie/run"
animation = &"basic_zombie_walk"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vxhht"]
advance_mode = 2
@ -221,7 +111,7 @@ 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(210, 91)
graph_offset = Vector2(-30, 35)
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_txjqc"]
graph_offset = Vector2(-447, 53)
@ -241,11 +131,56 @@ mult_value = 1.0
[node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")]
_armor = NodePath("CanArmor")
MaxHP = 130.0
_effectImmunities = Array[ExtResource("2_txjqc")]([ExtResource("3_b583s")])
_effectImmunities = [ExtResource("3_b583s")]
[node name="CanvasGroup" parent="." index="0"]
material = SubResource("ShaderMaterial_w8pya")
[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"]
scale = Vector2(0.999825, 0.999825)
[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"]
scale = Vector2(0.999829, 0.999829)
[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"]
scale = Vector2(0.999826, 0.999826)
[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"]
scale = Vector2(0.999829, 0.999829)
[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"]
scale = Vector2(0.999829, 0.999829)
[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"]
scale = Vector2(0.999824, 0.999824)
[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"]
scale = Vector2(0.999829, 0.999829)
[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"]
scale = Vector2(0.99983, 0.99983)
[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"]
scale = Vector2(0.99982, 0.99982)
[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"]
scale = Vector2(0.99983, 0.99983)
[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"]
scale = Vector2(0.999829, 0.999829)
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"]
scale = Vector2(0.999831, 0.999831)
[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"]
scale = Vector2(0.99983, 0.99983)
[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="1"]
scale = Vector2(0.999829, 0.999829)
[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"]
scale = Vector2(0.999829, 0.999829)
[node name="Can" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data")]
collision_layer = 128
collision_mask = 64
@ -277,22 +212,17 @@ shape = SubResource("CapsuleShape2D_4248q")
[node name="Eatbox" parent="." index="2"]
_damage = SubResource("Resource_qg8rq")
[node name="AnimationPlayer" parent="." index="3"]
libraries = {
&"": SubResource("AnimationLibrary_sq25x"),
&"basic_zombie": ExtResource("4_02fim"),
&"hobo_zombie": SubResource("AnimationLibrary_5selg")
}
autoplay = "baisc_zombie/walk"
speed_scale = 3.0
[node name="AnimationTree" parent="." index="4"]
[node name="AnimationTree" parent="." index="3"]
tree_root = SubResource("AnimationNodeBlendTree_txjqc")
advance_expression_base_node = NodePath("../Behaviour")
[node name="Mover" parent="." index="5"]
[node name="Mover" parent="." index="4"]
_speed = SubResource("Resource_4248q")
[node name="HitPlayer" parent="." index="6"]
playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")])
channels = Array[String](["metal_hit", "hit"])
[node name="CanArmor" type="Node" parent="." index="7"]
script = ExtResource("4_w8pya")
MaxHP = 385.0
@ -303,10 +233,6 @@ script = ExtResource("4_5selg")
_eatBox = NodePath("../Eatbox")
_animationTree = NodePath("../AnimationTree")
[node name="HitPlayer" parent="." index="9"]
playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")])
channels = Array[String](["metal_hit", "hit"])
[node name="RipPlayer" type="Node" parent="." index="11"]
script = ExtResource("11_7jlle")
audioStream = ExtResource("12_w1b1s")