2022-04-29 21:43:19 +01:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using QSB.WorldSync;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace QSB.EchoesOfTheEye.Prisoner.Messages;
|
|
|
|
|
|
2023-07-28 19:30:57 +01:00
|
|
|
|
public class EmergeTriggerMessage : QSBMessage
|
2022-04-29 21:43:19 +01:00
|
|
|
|
{
|
|
|
|
|
public override void OnReceiveRemote()
|
|
|
|
|
{
|
|
|
|
|
// hewwo
|
2022-05-03 08:48:24 +01:00
|
|
|
|
var director = QSBWorldSync.GetUnityObject<PrisonerDirector>();
|
2022-04-29 21:43:19 +01:00
|
|
|
|
director._darknessAwoken = true;
|
|
|
|
|
director._cellevator.OnPrisonerReveal();
|
|
|
|
|
director._musicSource.SetLocalVolume(Locator.GetAudioManager().GetAudioEntry(director._musicSource.audioLibraryClip).volume);
|
|
|
|
|
director._musicSource.Play();
|
2022-05-01 12:26:17 +01:00
|
|
|
|
director._prisonerBrain.BeginBehavior(PrisonerBehavior.Emerge);
|
2022-04-29 21:43:19 +01:00
|
|
|
|
}
|
|
|
|
|
}
|