Concurrent audio limit and volume limiter

This commit is contained in:
MaddoScientisto 2025-04-05 18:46:20 +02:00
commit a533f93361
11 changed files with 162 additions and 6 deletions

View file

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Cirno.Scripts;
using Cirno.Scripts.Components.FSM;
using Cirno.Scripts.Misc;
using Cirno.Scripts.Resources;
using Godot.Collections;
using Cirno.Scripts.Utils;
@ -60,6 +61,8 @@ public partial class GameManager : Node2D
public delegate void PlayerRespawnedEventHandler();
public Vector2 LastCheckpointPosition { get; set; }
private AudioManager _audioManager;
[Export]
public Node2D PlayerParentNode { get; set; }
@ -76,6 +79,9 @@ public partial class GameManager : Node2D
GlobalState.Instance.SaveGame();
}
_audioManager = new AudioManager();
this.AddChild(_audioManager);
_hud = GetNodeOrNull<Hud>("HUD");
if (_hud == null) GD.Print("No HUD in scene.");