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

29 lines
699 B
C#

using QSB.Messaging;
using QSB.WorldSync;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QSB.EchoesOfTheEye.Prisoner.Messages;
internal class StopProjectMessage : QSBMessage<bool>
{
public StopProjectMessage(bool done) : base(done) { }
public override void OnReceiveRemote()
{
var director = QSBWorldSync.GetUnityObject<PrisonerDirector>();
if (!Data)
{
director._prisonerBrain.BeginBehavior(PrisonerBehavior.WaitForProjection, 0.5f);
return;
}
director._prisonerDetector.SetActivation(false);
director._prisonerBrain.BeginBehavior(PrisonerBehavior.ExperienceEmotionalCatharsis, 0.5f);
}
}