217 lines
7.4 KiB
Text
217 lines
7.4 KiB
Text
[gd_scene load_steps=28 format=3 uid="uid://co11v3w8hbwgf"]
|
|
|
|
[ext_resource type="Script" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"]
|
|
[ext_resource type="Texture2D" uid="uid://bwwbkybryi6k0" path="res://assets/sprites/zombie.tres" id="2_4pdxh"]
|
|
[ext_resource type="Shader" path="res://assets/shaders/CG_color_blender.gdshader" id="2_srwwe"]
|
|
[ext_resource type="Script" path="res://scripts/components/zombies/EatBox.cs" id="3_2aulo"]
|
|
[ext_resource type="Script" path="res://scripts/components/FlashComponent.cs" id="3_rao3m"]
|
|
[ext_resource type="Script" path="res://scripts/components/zombies/ZombieMover.cs" id="4_u5syx"]
|
|
[ext_resource type="Script" path="res://scripts/components/zombies/behaviours/BasicZombieBehaviour.cs" id="5_2pvkr"]
|
|
[ext_resource type="AudioStream" uid="uid://xoy5ct1t17k5" path="res://assets/audio/sfx/slap.mp3" id="8_di4dd"]
|
|
[ext_resource type="Script" path="res://scripts/components/zombies/AudioDamage.cs" id="9_oxd1e"]
|
|
|
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"]
|
|
resource_local_to_scene = true
|
|
shader = ExtResource("2_srwwe")
|
|
shader_parameter/blend_color = Color(1, 1, 1, 1)
|
|
shader_parameter/amount = null
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"]
|
|
size = Vector2(2, 84)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"]
|
|
size = Vector2(16, 48)
|
|
|
|
[sub_resource type="Animation" id="Animation_qv5y7"]
|
|
length = 0.001
|
|
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(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"values": [{
|
|
"args": [0.0],
|
|
"method": &"SetSpeed"
|
|
}]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sq25x"]
|
|
_data = {
|
|
"RESET": SubResource("Animation_qv5y7")
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_fwldj"]
|
|
resource_name = "eat"
|
|
loop_mode = 1
|
|
step = 0.1
|
|
tracks/0/type = "method"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Eatbox")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0.5),
|
|
"transitions": PackedFloat32Array(1),
|
|
"values": [{
|
|
"args": [],
|
|
"method": &"Bite"
|
|
}]
|
|
}
|
|
tracks/1/type = "method"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Mover")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"values": [{
|
|
"args": [0.0],
|
|
"method": &"SetSpeed"
|
|
}]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_lrgn8"]
|
|
resource_name = "idle"
|
|
loop_mode = 1
|
|
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(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"values": [{
|
|
"args": [0.0],
|
|
"method": &"SetSpeed"
|
|
}]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_ebhxh"]
|
|
resource_name = "walk"
|
|
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(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"values": [{
|
|
"args": [0.5],
|
|
"method": &"SetSpeed"
|
|
}]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5ci4h"]
|
|
_data = {
|
|
"eat": SubResource("Animation_fwldj"),
|
|
"idle": SubResource("Animation_lrgn8"),
|
|
"walk": SubResource("Animation_ebhxh")
|
|
}
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"]
|
|
animation = &"baisc_zombie/eat"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nog33"]
|
|
animation = &"baisc_zombie/idle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g2uel"]
|
|
animation = &"baisc_zombie/walk"
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vxhht"]
|
|
advance_mode = 2
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_r8rju"]
|
|
advance_mode = 2
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y2ivb"]
|
|
advance_mode = 2
|
|
advance_condition = &"eat"
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7d3k4"]
|
|
advance_mode = 2
|
|
advance_condition = &"eat"
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kk4wi"]
|
|
advance_mode = 2
|
|
advance_condition = &"end_eat"
|
|
|
|
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_qep5j"]
|
|
states/End/position = Vector2(1183, 100)
|
|
states/baisc_zombie_eat/node = SubResource("AnimationNodeAnimation_h0rfo")
|
|
states/baisc_zombie_eat/position = Vector2(575, 185)
|
|
states/baisc_zombie_idle/node = SubResource("AnimationNodeAnimation_nog33")
|
|
states/baisc_zombie_idle/position = Vector2(368, 100)
|
|
states/baisc_zombie_walk/node = SubResource("AnimationNodeAnimation_g2uel")
|
|
states/baisc_zombie_walk/position = Vector2(575, 35)
|
|
transitions = ["Start", "baisc_zombie_idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "baisc_zombie_idle", "baisc_zombie_walk", SubResource("AnimationNodeStateMachineTransition_r8rju"), "baisc_zombie_idle", "baisc_zombie_eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "baisc_zombie_walk", "baisc_zombie_eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "baisc_zombie_eat", "baisc_zombie_walk", SubResource("AnimationNodeStateMachineTransition_kk4wi")]
|
|
graph_offset = Vector2(-17, -2)
|
|
|
|
[node name="Zombie" type="Node2D"]
|
|
script = ExtResource("1_qq3f1")
|
|
_maxHP = 100
|
|
|
|
[node name="CanvasGroup" type="CanvasGroup" parent="."]
|
|
material = SubResource("ShaderMaterial_63ls2")
|
|
script = ExtResource("3_rao3m")
|
|
|
|
[node name="Sprite" type="Sprite2D" parent="CanvasGroup"]
|
|
position = Vector2(0, -44)
|
|
texture = ExtResource("2_4pdxh")
|
|
|
|
[node name="Hitbox" type="Area2D" parent="."]
|
|
collision_layer = 8
|
|
collision_mask = 0
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
|
position = Vector2(2, -42)
|
|
shape = SubResource("RectangleShape2D_hxyad")
|
|
|
|
[node name="Eatbox" type="Area2D" parent="." node_paths=PackedStringArray("_animationTree")]
|
|
collision_layer = 0
|
|
collision_mask = 2
|
|
script = ExtResource("3_2aulo")
|
|
_damage = 10
|
|
_animationTree = NodePath("../AnimationTree")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"]
|
|
position = Vector2(-10, -24)
|
|
shape = SubResource("RectangleShape2D_r4ug6")
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
"": SubResource("AnimationLibrary_sq25x"),
|
|
"baisc_zombie": SubResource("AnimationLibrary_5ci4h")
|
|
}
|
|
|
|
[node name="AnimationTree" type="AnimationTree" parent="."]
|
|
tree_root = SubResource("AnimationNodeStateMachine_qep5j")
|
|
anim_player = NodePath("../AnimationPlayer")
|
|
parameters/conditions/eat = false
|
|
parameters/conditions/end_eat = false
|
|
|
|
[node name="Mover" type="Node" parent="."]
|
|
script = ExtResource("4_u5syx")
|
|
_speedMultiplier = 0.25
|
|
|
|
[node name="Behaviour" type="Node" parent="."]
|
|
script = ExtResource("5_2pvkr")
|
|
|
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("8_di4dd")
|
|
script = ExtResource("9_oxd1e")
|
|
|
|
[connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"]
|
|
[connection signal="OnHPChanged" from="." to="AudioStreamPlayer2D" method="OnDamaged"]
|
|
[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"]
|
|
[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"]
|