You can fly even in lobby #1

Merged
pozhiloy-enotik merged 3 commits from master into master 2022-05-10 17:35:40 +00:00
Showing only changes of commit 2b9be131f6 - Show all commits

View File

@@ -7,5 +7,22 @@
OptionsHelpers optionsHelpers = UnityEngine.Object.FindObjectOfType<OptionsHelpers>(); OptionsHelpers optionsHelpers = UnityEngine.Object.FindObjectOfType<OptionsHelpers>();
return optionsHelpers.inGame; return optionsHelpers.inGame;
} }
public static bool IsInGameOrLobby()
{
return GetPlayer() != null;
}
public static NolanBehaviour GetPlayer()
{
foreach (NolanBehaviour nb in UnityEngine.Object.FindObjectsOfType<NolanBehaviour>())
{
if (nb.entity.IsOwner)
{
return nb;
}
}
return null;
}
} }
} }