Add sound effects for buff management and notifications; update scene configurations
This commit is contained in:
@@ -11,6 +11,8 @@ namespace ParasiticGod.Scripts.Components;
|
||||
public partial class ActiveBuffsManager : Node
|
||||
{
|
||||
[Export] private PackedScene _activeBuffScene;
|
||||
[Export] private AudioStreamPlayer _buffRemovedSfx;
|
||||
[Export] private AudioStreamPlayer _buffAddedSfx;
|
||||
|
||||
private readonly Dictionary<Guid, ActiveBuffUi> _activeBuffUis = new();
|
||||
|
||||
@@ -33,6 +35,7 @@ public partial class ActiveBuffsManager : Node
|
||||
AddChild(buffInstance);
|
||||
buffInstance.SetBuff(buff);
|
||||
_activeBuffUis.Add(buff.Id, buffInstance);
|
||||
_buffAddedSfx?.Play();
|
||||
}
|
||||
|
||||
private void OnBuffRemoved(Buff buff)
|
||||
@@ -41,6 +44,7 @@ public partial class ActiveBuffsManager : Node
|
||||
{
|
||||
buffUi.QueueFree();
|
||||
_activeBuffUis.Remove(buff.Id);
|
||||
_buffRemovedSfx?.Play();
|
||||
}
|
||||
}
|
||||
}
|
@@ -8,6 +8,7 @@ namespace ParasiticGod.Scripts.Components;
|
||||
public partial class NotificationManager : CanvasLayer
|
||||
{
|
||||
[Export] private PackedScene _notificationLabelScene;
|
||||
[Export] private AudioStreamPlayer _sfx;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
@@ -26,6 +27,7 @@ public partial class NotificationManager : CanvasLayer
|
||||
{
|
||||
var notification = _notificationLabelScene.Instantiate<NotificationLabel>();
|
||||
AddChild(notification);
|
||||
_sfx?.Play();
|
||||
notification.ShowNotification($"You have entered\n{ageName}!");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user