Splitted default and music bus

This commit is contained in:
Rendo 2025-07-12 20:59:35 +05:00
commit bbda020a2d
5 changed files with 40 additions and 32 deletions

View file

@ -8,3 +8,9 @@ bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = -0.130497
bus/1/send = &"Master"
bus/2/name = &"SFXBus"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = &"Master"

View file

@ -769,13 +769,13 @@ scale = Vector2(0.999902, 0.999902)
texture = SubResource("AtlasTexture_txjqc")
[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"]
scale = Vector2(0.999829, 0.999829)
scale = Vector2(0.999828, 0.999828)
[node name="Right_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="0"]
texture = SubResource("AtlasTexture_b583s")
[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"]
scale = Vector2(0.999832, 0.999832)
scale = Vector2(0.999831, 0.999831)
[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"]
scale = Vector2(0.999829, 0.999829)
@ -787,34 +787,34 @@ texture = SubResource("AtlasTexture_uoit3")
texture = SubResource("AtlasTexture_vn3j1")
[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"]
scale = Vector2(0.999826, 0.999826)
scale = Vector2(0.999828, 0.999828)
[node name="Left_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="0"]
texture = SubResource("AtlasTexture_yb81c")
[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"]
scale = Vector2(0.999827, 0.999827)
scale = Vector2(0.999829, 0.999829)
[node name="Left_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="0"]
texture = SubResource("AtlasTexture_nlwsb")
[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"]
scale = Vector2(0.999823, 0.999823)
scale = Vector2(0.999822, 0.999822)
[node name="Left_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot" index="0"]
texture = SubResource("AtlasTexture_8y6c0")
[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"]
scale = Vector2(0.999827, 0.999827)
scale = Vector2(0.999828, 0.999828)
[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"]
scale = Vector2(0.999826, 0.999826)
scale = Vector2(0.999825, 0.999825)
[node name="Right_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="0"]
texture = SubResource("AtlasTexture_nc6p3")
[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"]
scale = Vector2(0.999813, 0.999813)
scale = Vector2(0.999814, 0.999814)
[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"]
scale = Vector2(0.999828, 0.999828)
@ -830,7 +830,7 @@ texture = SubResource("AtlasTexture_0s5wm")
[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"]
position = Vector2(-9, -21)
rotation = 0.00885234
rotation = 0.0163802
scale = Vector2(1e-05, 1e-05)
[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"]
@ -873,15 +873,13 @@ texture = SubResource("AtlasTexture_pjhfy")
[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"]
position = Vector2(-16, -8)
scale = Vector2(1, 1)
[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"]
position = Vector2(-4, -9.00001)
scale = Vector2(1, 1)
position = Vector2(-4, -9)
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"]
position = Vector2(-3, 3)
rotation = -0.0143978
rotation = -0.0266413
scale = Vector2(0.999829, 0.999829)
texture = SubResource("AtlasTexture_7cvmi")
offset = Vector2(-14, -2)
@ -905,7 +903,6 @@ metadata/_edit_lock_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="1"]
position = Vector2(2.99791, -20.018)
scale = Vector2(1, 1)
shape = SubResource("CircleShape2D_vn3j1")
[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="2" node_paths=PackedStringArray("_observedArmor")]
@ -914,7 +911,7 @@ _threshold = 0.333
_observedArmor = NodePath("../../../../../../../../../../CanArmor")
[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"]
scale = Vector2(0.999828, 0.999828)
scale = Vector2(0.999829, 0.999829)
[node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"]
position = Vector2(-0.0022974, -17.0131)
@ -929,14 +926,14 @@ editor_settings/show_bone_gizmo = false
remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid")
[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"]
scale = Vector2(0.999829, 0.999829)
scale = Vector2(0.999826, 0.999826)
[node name="Left_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="0"]
texture = SubResource("AtlasTexture_tebih")
[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"]
rotation = 0.00798553
scale = Vector2(0.999999, 0.999999)
rotation = 0.0147763
scale = Vector2(0.999998, 0.999998)
texture = SubResource("AtlasTexture_auxav")
[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"]
@ -945,7 +942,7 @@ scale = Vector2(0.999652, 0.999652)
texture = SubResource("AtlasTexture_dntsa")
[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"]
scale = Vector2(0.999829, 0.999829)
scale = Vector2(0.999828, 0.999828)
[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"]
scale = Vector2(0.999822, 0.999822)
@ -987,8 +984,8 @@ audioStream = ExtResource("12_w1b1s")
channel = "anger"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid/RemoteTransform2D" method="queue_free"]
[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" method="FallOff"]
[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid/RemoteTransform2D" method="queue_free"]
[connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"]
[connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" method="FallOff"]
[connection signal="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"]

View file

@ -72,14 +72,25 @@ label_settings = SubResource("LabelSettings_or0he")
horizontal_alignment = 1
metadata/_edit_use_anchors_ = true
[node name="SFXVolume" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"]
[node name="Volumes" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
[node name="Label" type="Label" parent="Pause/MarginContainer/Buttons/SFXVolume"]
[node name="Labels" type="VBoxContainer" parent="Pause/MarginContainer/Buttons/Volumes"]
layout_mode = 2
[node name="SFX" type="Label" parent="Pause/MarginContainer/Buttons/Volumes/Labels"]
layout_mode = 2
text = "sfx"
[node name="HSlider" type="HSlider" parent="Pause/MarginContainer/Buttons/SFXVolume"]
[node name="Music" type="Label" parent="Pause/MarginContainer/Buttons/Volumes/Labels"]
layout_mode = 2
text = "music"
[node name="Sliders" type="VBoxContainer" parent="Pause/MarginContainer/Buttons/Volumes"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SFX" type="HSlider" parent="Pause/MarginContainer/Buttons/Volumes/Sliders"]
layout_mode = 2
size_flags_horizontal = 3
max_value = 1.0
@ -87,14 +98,7 @@ step = 0.01
value = 1.0
script = ExtResource("3_e3p60")
[node name="MusicVolume" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"]
layout_mode = 2
[node name="Label" type="Label" parent="Pause/MarginContainer/Buttons/MusicVolume"]
layout_mode = 2
text = "music"
[node name="HSlider" type="HSlider" parent="Pause/MarginContainer/Buttons/MusicVolume"]
[node name="Music" type="HSlider" parent="Pause/MarginContainer/Buttons/Volumes/Sliders"]
layout_mode = 2
size_flags_horizontal = 3
max_value = 1.0

View file

@ -58,6 +58,7 @@ public partial class AudioSequencer : Node
channelProcess.Add(id, false);
player.Name = id;
player.MaxPolyphony = 5;
player.Bus = "SFXBus";
player.Finished += () => { MarkChannel(id, false); };

View file

@ -30,7 +30,7 @@ public partial class AudioSlider : HSlider
if (affects == TYPE.SFX)
{
Utility.SFX = Value;
AudioServer.SetBusVolumeDb(0, Mathf.LinearToDb((float)Value));
AudioServer.SetBusVolumeDb(2, Mathf.LinearToDb((float)Value));
}
else
{