2022-01-13 05:43:57 +00:00
|
|
|
|
using QSB.Player;
|
2022-01-13 03:43:48 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.TriggerSync.WorldObjects
|
2022-01-13 03:18:59 +00:00
|
|
|
|
{
|
|
|
|
|
public class QSBMaskZoneTrigger : QSBTrigger<MaskZoneController>
|
|
|
|
|
{
|
|
|
|
|
public override void Init()
|
|
|
|
|
{
|
|
|
|
|
base.Init();
|
|
|
|
|
AttachedObject.OnEntry -= TriggerOwner.OnEnterMaskZone;
|
|
|
|
|
AttachedObject.OnExit -= TriggerOwner.OnExitMaskZone;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-13 05:43:57 +00:00
|
|
|
|
protected override void OnEnter(PlayerInfo player)
|
|
|
|
|
{
|
2022-01-15 16:22:46 +00:00
|
|
|
|
if (Occupants.Count == 1 && !TriggerOwner._shuttle.HasLaunched())
|
2022-01-13 05:43:57 +00:00
|
|
|
|
{
|
|
|
|
|
TriggerOwner._whiteSphere.SetActive(true);
|
|
|
|
|
TriggerOwner._groundSignal.SetSignalActivation(false);
|
|
|
|
|
TriggerOwner._skySignal.SetSignalActivation(true);
|
|
|
|
|
TriggerOwner._skeletonTower.SetIsQuantum(TriggerOwner._hasPlayerLookedAtSky);
|
|
|
|
|
TriggerOwner.enabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-13 03:43:48 +00:00
|
|
|
|
|
2022-01-13 05:43:57 +00:00
|
|
|
|
protected override void OnExit(PlayerInfo player)
|
|
|
|
|
{
|
|
|
|
|
if (Occupants.Count == 0 && !TriggerOwner._shuttle.HasLaunched())
|
|
|
|
|
{
|
|
|
|
|
TriggerOwner._whiteSphere.SetActive(false);
|
|
|
|
|
TriggerOwner._skeletonTower.SetIsQuantum(false);
|
|
|
|
|
TriggerOwner._groundSignal.SetSignalActivation(true);
|
|
|
|
|
TriggerOwner._skySignal.SetSignalActivation(false);
|
|
|
|
|
TriggerOwner.enabled = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-13 03:18:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|