mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 09:32:38 +00:00
21 lines
609 B
C#
21 lines
609 B
C#
using QSB.EchoesOfTheEye.Ghosts.WorldObjects;
|
|
using QSB.Messaging;
|
|
|
|
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
|
|
|
internal class PlayVoiceAudioMessage : QSBWorldObjectMessage<QSBGhostEffects, (AudioType audioType, float volumeScale, bool near)>
|
|
{
|
|
public PlayVoiceAudioMessage(AudioType audioType, float volumeScale, bool near) : base((audioType, volumeScale, near)) { }
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
if (Data.near)
|
|
{
|
|
WorldObject.PlayVoiceAudioNear(Data.audioType, Data.volumeScale, true);
|
|
return;
|
|
}
|
|
|
|
WorldObject.PlayVoiceAudioFar(Data.audioType, Data.volumeScale, true);
|
|
}
|
|
}
|