mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-12 04:14:08 +00:00
move host button eye check
This commit is contained in:
parent
0ee1222d3e
commit
61ff7b71e0
@ -12,8 +12,6 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
|
||||
private static void Handler(EyeState state)
|
||||
{
|
||||
MenuManager.Instance.OnEyeStateChange(state);
|
||||
|
||||
if (PlayerTransformSync.LocalInstance)
|
||||
{
|
||||
new EyeStateMessage(state).Send();
|
||||
|
@ -49,6 +49,15 @@ namespace QSB.Menus
|
||||
|
||||
private void OnSceneLoaded(OWScene oldScene, OWScene newScene, bool isUniverse)
|
||||
{
|
||||
if (newScene == OWScene.EyeOfTheUniverse)
|
||||
{
|
||||
GlobalMessenger<EyeState>.AddListener(OWEvents.EyeStateChanged, OnEyeStateChanged);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalMessenger<EyeState>.RemoveListener(OWEvents.EyeStateChanged, OnEyeStateChanged);
|
||||
}
|
||||
|
||||
if (isUniverse)
|
||||
{
|
||||
InitPauseMenus();
|
||||
@ -199,7 +208,7 @@ namespace QSB.Menus
|
||||
DisconnectPopup._labelText.text = popupText;
|
||||
}
|
||||
|
||||
public void OnEyeStateChange(EyeState state)
|
||||
private void OnEyeStateChanged(EyeState state)
|
||||
{
|
||||
if (state >= EyeState.IntoTheVortex)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user