quantum-space-buddies/QSB/EchoesOfTheEye/Prisoner/Messages/EmergeTriggerMessage.cs
2022-05-03 08:48:24 +01:00

20 lines
594 B
C#

using QSB.Messaging;
using QSB.WorldSync;
using System.Linq;
namespace QSB.EchoesOfTheEye.Prisoner.Messages;
internal class EmergeTriggerMessage : QSBMessage
{
public override void OnReceiveRemote()
{
// hewwo
var director = QSBWorldSync.GetUnityObject<PrisonerDirector>();
director._darknessAwoken = true;
director._cellevator.OnPrisonerReveal();
director._musicSource.SetLocalVolume(Locator.GetAudioManager().GetAudioEntry(director._musicSource.audioLibraryClip).volume);
director._musicSource.Play();
director._prisonerBrain.BeginBehavior(PrisonerBehavior.Emerge);
}
}