2022-04-29 21:43:19 +01:00

24 lines
635 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.GetUnityObjects<PrisonerDirector>().First();
director._darknessAwoken = true;
director._cellevator.OnPrisonerReveal();
director._musicSource.SetLocalVolume(Locator.GetAudioManager().GetAudioEntry(director._musicSource.audioLibraryClip).volume);
director._musicSource.Play();
if (QSBCore.IsHost)
{
director._prisonerBrain.BeginBehavior(PrisonerBehavior.Emerge);
}
}
}