Simplify by using property

This commit is contained in:
Paul Pacheco 2019-02-17 19:53:11 -06:00
parent 559c1f155a
commit fc203dd89e
2 changed files with 2 additions and 7 deletions

View File

@ -11,15 +11,10 @@ public static class ClientScene
{ {
static bool s_IsSpawnFinished; static bool s_IsSpawnFinished;
internal static void SetNotReady()
{
ready = false;
}
static List<uint> s_PendingOwnerNetIds = new List<uint>(); static List<uint> s_PendingOwnerNetIds = new List<uint>();
public static NetworkIdentity localPlayer { get; private set; } public static NetworkIdentity localPlayer { get; private set; }
public static bool ready { get; private set; } public static bool ready { get; internal set; }
public static NetworkConnection readyConnection { get; private set; } public static NetworkConnection readyConnection { get; private set; }
public static Dictionary<Guid, GameObject> prefabs = new Dictionary<Guid, GameObject>(); public static Dictionary<Guid, GameObject> prefabs = new Dictionary<Guid, GameObject>();

View File

@ -609,7 +609,7 @@ internal void OnClientNotReadyMessageInternal(NetworkMessage netMsg)
{ {
if (LogFilter.Debug) { Debug.Log("NetworkManager:OnClientNotReadyMessageInternal"); } if (LogFilter.Debug) { Debug.Log("NetworkManager:OnClientNotReadyMessageInternal"); }
ClientScene.SetNotReady(); ClientScene.ready = false;
OnClientNotReady(netMsg.conn); OnClientNotReady(netMsg.conn);
// NOTE: s_ClientReadyConnection is not set here! don't want OnClientConnect to be invoked again after scene changes. // NOTE: s_ClientReadyConnection is not set here! don't want OnClientConnect to be invoked again after scene changes.