mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
hide players who launch in shuttle
This commit is contained in:
parent
864b29aec9
commit
62c4214184
@ -1,5 +1,7 @@
|
||||
using QSB.EyeOfTheUniverse.EyeStateSync.Messages;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@ -25,6 +27,9 @@ namespace QSB.EyeOfTheUniverse.MaskSync
|
||||
GlobalMessenger<float, float>.FireEvent(OWEvents.FlickerOffAndOn, 0.5f, 0.5f);
|
||||
_flickerOutTime = Time.time + 0.5f;
|
||||
_flickering = true;
|
||||
|
||||
// hide all players in shuttle
|
||||
QSBPlayerManager.PlayerList.Where(x => x.IsInEyeShuttle).ForEach(x => x.DitheringAnimator.SetVisibleImmediate(false));
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -39,6 +39,7 @@ namespace QSB.Player
|
||||
public bool IsReady { get; set; }
|
||||
public bool IsInMoon { get; set; }
|
||||
public bool IsInShrine { get; set; }
|
||||
public bool IsInEyeShuttle { get; set; }
|
||||
public IQSBQuantumObject EntangledObject { get; set; }
|
||||
public QSBPlayerAudioController AudioController { get; set; }
|
||||
public DitheringAnimator DitheringAnimator { get; set; }
|
||||
|
20
QSB/TriggerSync/WorldObjects/QSBEyeShuttleTrigger.cs
Normal file
20
QSB/TriggerSync/WorldObjects/QSBEyeShuttleTrigger.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using QSB.Player;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBEyeShuttleTrigger : QSBTrigger<EyeShuttleController>
|
||||
{
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
AttachedObject.OnEntry -= TriggerOwner.OnEnterShuttle;
|
||||
AttachedObject.OnExit -= TriggerOwner.OnExitShuttle;
|
||||
}
|
||||
|
||||
protected override void OnEnter(PlayerInfo player)
|
||||
=> player.IsInEyeShuttle = true;
|
||||
|
||||
protected override void OnExit(PlayerInfo player)
|
||||
=> player.IsInEyeShuttle = false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user