Audio system and rich text

This commit is contained in:
Rendo 2025-06-29 14:28:51 +05:00
commit 68cafff083
161 changed files with 1605 additions and 255 deletions

View file

@ -1,9 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://xu4i6tmkv00a"]
[gd_scene load_steps=10 format=3 uid="uid://xu4i6tmkv00a"]
[ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_mwqpo"]
[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_3mrqj"]
[ext_resource type="Texture2D" uid="uid://ce04l60l6mhfk" path="res://assets/sprites/bucket.tres" id="3_0nlp0"]
[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_1s2fn"]
[ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="5_lt6ps"]
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="6_kedip"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wdi07"]
resource_local_to_scene = true
@ -45,3 +47,7 @@ _speed = SubResource("Resource_lt6ps")
[node name="Armor" parent="." index="7"]
_maxHP = 385
[node name="HitPlayer" parent="." index="8"]
playlist = Array[AudioStream]([ExtResource("5_lt6ps"), ExtResource("6_kedip")])
channels = Array[String](["metal_hit", "hit"])

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=3 uid="uid://hhjbqkjqpt7x"]
[gd_scene load_steps=13 format=3 uid="uid://hhjbqkjqpt7x"]
[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_3dq4c"]
[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_2dq8e"]
@ -6,6 +6,8 @@
[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/components/particles/FallParticle.cs" id="3_w70im"]
[ext_resource type="Texture2D" uid="uid://ceqvdmude7cgg" path="res://assets/sprites/cone.tres" id="4_qdhik"]
[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_qof5v"]
[ext_resource type="AudioStream" uid="uid://bmupd3v3gvsca" path="res://assets/audio/sfx/plastichit_generic.tres" id="7_0amn8"]
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="7_67t4t"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_sat5k"]
resource_local_to_scene = true
@ -35,7 +37,7 @@ _armor = NodePath("Armor")
[node name="CanvasGroup" parent="." index="0"]
material = SubResource("ShaderMaterial_sat5k")
[node name="Hat" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data", "deathTimer")]
[node name="Hat" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data")]
position = Vector2(-9, -76)
collision_layer = 128
collision_mask = 64
@ -44,10 +46,9 @@ center_of_mass_mode = 1
freeze = true
script = ExtResource("3_w70im")
data = NodePath("../..")
deathTimer = NodePath("Timer")
falloffImpulseMin = Vector2(0, 1)
falloffImpulseMax = Vector2(1, 0)
falloffOffsetMin = Vector2(1, 0)
maxAngle = 45.0
minTorque = -45.0
maxTorque = 45.0
Impulse = 100.0
[node name="Sprite" type="Sprite2D" parent="CanvasGroup/Hat" index="0"]
@ -58,9 +59,6 @@ texture = ExtResource("4_qdhik")
position = Vector2(1, -6)
shape = SubResource("CircleShape2D_67t4t")
[node name="Timer" type="Timer" parent="CanvasGroup/Hat" index="2"]
wait_time = 5.0
[node name="Eatbox" parent="." index="2"]
_damage = SubResource("Resource_w70im")
@ -71,5 +69,9 @@ _speed = SubResource("Resource_qof5v")
script = ExtResource("3_5s7in")
_maxHP = 130
[connection signal="timeout" from="CanvasGroup/Hat/Timer" to="CanvasGroup/Hat" method="queue_free"]
[node name="HitPlayer" parent="." index="8"]
playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")])
channels = Array[String](["plastic_hit", "hit"])
[connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"]
[connection signal="ArmorLost" from="Armor" to="CanvasGroup/Hat" method="FallOff"]

View file

@ -1,12 +1,17 @@
[gd_scene load_steps=34 format=3 uid="uid://bgqmwsb6ynm81"]
[gd_scene load_steps=40 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="Texture2D" uid="uid://cse1504ao4g8e" path="res://assets/sprites/atlases/zombies/hobo.png" id="3_6qr4h"]
[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"]
[ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="8_4248q"]
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="9_tu6af"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="11_7jlle"]
[ext_resource type="AudioStream" uid="uid://ch55p7qbaawtp" path="res://assets/audio/sfx/argh.tres" id="12_w1b1s"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_w8pya"]
resource_local_to_scene = true
@ -22,6 +27,10 @@ region = Rect2(0, 15, 40, 49)
atlas = ExtResource("3_6qr4h")
region = Rect2(3, 0, 35, 11)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_4248q"]
radius = 17.0
height = 48.0
[sub_resource type="Resource" id="Resource_qg8rq"]
resource_local_to_scene = true
script = ExtResource("4_c1y3b")
@ -101,6 +110,20 @@ tracks/2/keys = {
"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"
@ -206,7 +229,16 @@ _armor = NodePath("CanArmor")
[node name="CanvasGroup" parent="." index="0"]
material = SubResource("ShaderMaterial_w8pya")
[node name="Can" type="Node2D" parent="CanvasGroup" index="1"]
[node name="Can" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data")]
collision_layer = 128
collision_mask = 64
freeze = true
script = ExtResource("3_tu6af")
data = NodePath("../..")
maxAngle = 45.0
minTorque = -45.0
maxTorque = 45.0
Impulse = 100.0
[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/Can" index="0"]
position = Vector2(-4, -40)
@ -217,6 +249,10 @@ z_index = -1
position = Vector2(-6, -63)
texture = SubResource("AtlasTexture_5selg")
[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/Can" index="2"]
position = Vector2(-3, -40)
shape = SubResource("CapsuleShape2D_4248q")
[node name="Eatbox" parent="." index="2"]
_damage = SubResource("Resource_qg8rq")
@ -246,5 +282,16 @@ script = ExtResource("4_5selg")
_eatBox = NodePath("../Eatbox")
_animationTree = NodePath("../AnimationTree")
[connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/Can" method="queue_free"]
[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")
channel = "anger"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"]
[connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/Can" method="FallOff"]
[connection signal="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"]

View file

@ -1,16 +1,21 @@
[gd_scene load_steps=19 format=3 uid="uid://co11v3w8hbwgf"]
[gd_scene load_steps=24 format=3 uid="uid://co11v3w8hbwgf"]
[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"]
[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"]
[ext_resource type="AudioStream" uid="uid://dt13iugnnx4op" path="res://assets/audio/sfx/yuck_generic.tres" id="2_hh4qh"]
[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_srwwe"]
[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/components/zombies/EatBox.cs" id="3_2aulo"]
[ext_resource type="AudioStream" uid="uid://bjotp63arocci" path="res://assets/audio/sfx/frozen.mp3" id="3_ltj46"]
[ext_resource type="Script" uid="uid://c5vfccegyy01t" path="res://scripts/components/FlashComponent.cs" id="3_rao3m"]
[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/components/zombies/ZombieMover.cs" id="4_u5syx"]
[ext_resource type="AnimationLibrary" uid="uid://cuh2kyb21hmkm" path="res://resources/animations/zombies/basic_zombie.res" id="6_ckb7n"]
[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="7_b3p4o"]
[ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://resources/animations/zombies/basic_zombie_tree.tres" id="8_ckb7n"]
[ext_resource type="AudioStream" uid="uid://xoy5ct1t17k5" path="res://assets/audio/sfx/slap.mp3" id="8_di4dd"]
[ext_resource type="Script" uid="uid://bsg4utgc0u0vo" path="res://scripts/components/zombies/AudioDamage.cs" id="9_oxd1e"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="10_ruqsf"]
[ext_resource type="AudioStream" uid="uid://dyid55nhflwyn" path="res://assets/audio/sfx/chomp_generic.tres" id="11_vjrlo"]
[ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="12_ad42i"]
[ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="12_he8da"]
[ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="12_vjrlo"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"]
resource_local_to_scene = true
@ -62,6 +67,8 @@ mult_value = 1.0
y_sort_enabled = true
script = ExtResource("1_qq3f1")
_maxHP = 70
garlicSound = ExtResource("2_hh4qh")
freezeSound = ExtResource("3_ltj46")
[node name="CanvasGroup" type="CanvasGroup" parent="."]
material = SubResource("ShaderMaterial_63ls2")
@ -104,11 +111,35 @@ anim_player = NodePath("../AnimationPlayer")
script = ExtResource("4_u5syx")
_speed = SubResource("Resource_ckb7n")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("8_di4dd")
script = ExtResource("9_oxd1e")
[node name="ChompPlayer" type="Node" parent="."]
script = ExtResource("10_ruqsf")
audioStream = ExtResource("11_vjrlo")
channel = "chomp"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="HitPlayer" type="Node" parent="."]
script = ExtResource("12_he8da")
playlist = Array[AudioStream]([ExtResource("12_vjrlo")])
channels = Array[String](["hit"])
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="GroanPlayer" type="Node" parent="."]
script = ExtResource("10_ruqsf")
audioStream = ExtResource("12_ad42i")
channel = "groan"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="Timer" type="Timer" parent="GroanPlayer"]
wait_time = 20.0
[node name="StartTimer" type="Timer" parent="GroanPlayer/Timer"]
wait_time = 5.0
one_shot = true
autostart = true
[connection signal="OnDamaged" from="." to="HitPlayer" method="Play"]
[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"]
[connection signal="timeout" from="GroanPlayer/Timer" to="GroanPlayer" method="Play"]
[connection signal="timeout" from="GroanPlayer/Timer/StartTimer" to="GroanPlayer/Timer" method="start"]