浏览代码

clarified pullUpdate naming and added an error catch.

/main/staging/wire_lobbydata_replacement
当前提交
1da4acd8
共有 3 个文件被更改,包括 9 次插入4 次删除
  1. 2
      Assets/Scripts/GameLobby/Game/LocalLobby.cs
  2. 5
      Assets/Scripts/GameLobby/Lobby/LobbyAsyncRequests.cs
  3. 6
      Assets/Scripts/GameLobby/Lobby/LobbyContentUpdater.cs

2
Assets/Scripts/GameLobby/Game/LocalLobby.cs


{
Dictionary<string, LobbyUser> m_LobbyUsers = new Dictionary<string, LobbyUser>();
public Dictionary<string, LobbyUser> LobbyUsers => m_LobbyUsers;
public bool pullUpdate;
public bool canPullUpdate;
#region LocalLobbyData
public struct LobbyData

5
Assets/Scripts/GameLobby/Lobby/LobbyAsyncRequests.cs


void EndListening()
{
if (m_lobbySubscription == null)
{
Debug.LogError("Can't End listening without first listening to the lobby Callbacks.");
return;
}
m_lobbySubscription.UnsubscribeAsync();
m_RemoteLobby = null;
m_lobbySubscription = null;

6
Assets/Scripts/GameLobby/Lobby/LobbyContentUpdater.cs


return;
}
if (changed.pullUpdate)
if (changed.canPullUpdate)
changed.pullUpdate = false;
changed.canPullUpdate = false;
return;
}

void OnRemoteLobbyUpdated(Lobby lobby)
{
m_LocalLobby.pullUpdate = true;
m_LocalLobby.canPullUpdate = true;
//synching our local lobby
LobbyConverters.RemoteToLocal(lobby, m_LocalLobby);

正在加载...
取消
保存