quantum-space-buddies/QSB/EchoesOfTheEye/Prisoner/Messages/StopProjectMessage.cs

29 lines
708 B
C#
Raw Normal View History

2022-05-01 11:26:17 +00:00
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.GetUnityObjects<PrisonerDirector>().First();
if (!Data)
{
director._prisonerBrain.BeginBehavior(PrisonerBehavior.WaitForProjection, 0.5f);
return;
}
director._prisonerDetector.SetActivation(false);
director._prisonerBrain.BeginBehavior(PrisonerBehavior.ExperienceEmotionalCatharsis, 0.5f);
}
}