mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 15:35:22 +00:00
disable host button when we progress far enough in the eye
This commit is contained in:
parent
2ecc3a4529
commit
a3f9f1391e
@ -1,4 +1,5 @@
|
||||
using QSB.Messaging;
|
||||
using QSB.Menus;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.WorldSync;
|
||||
@ -25,12 +26,14 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
public override void OnReceiveLocal()
|
||||
{
|
||||
QSBPlayerManager.LocalPlayer.EyeState = Value;
|
||||
MenuManager.Instance.OnEyeStateChange(Value);
|
||||
}
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.EyeState = Value;
|
||||
MenuManager.Instance.OnEyeStateChange(Value);
|
||||
}
|
||||
}
|
||||
}
|
@ -199,6 +199,14 @@ namespace QSB.Menus
|
||||
DisconnectPopup._labelText.text = popupText;
|
||||
}
|
||||
|
||||
public void OnEyeStateChange(EyeState state)
|
||||
{
|
||||
if (state >= EyeState.IntoTheVortex)
|
||||
{
|
||||
SetButtonActive(HostButton, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void MakeTitleMenus()
|
||||
{
|
||||
CreateCommonPopups();
|
||||
|
Loading…
x
Reference in New Issue
Block a user