浏览代码
Removed Relay related user synch limiting behaviour in LobbyUser. Synching is all done in LobbySynchronizer.
Removed Relay related user synch limiting behaviour in LobbyUser. Synching is all done in LobbySynchronizer.
Renamed Multiple previous callback methods in GameManager to a more future-tense version. Removed all magic strings from LobbyConverters to cached nameof() constants./main/staging/2021_Upgrade/Async_Refactor
当前提交
9a25d84e
共有 11 个文件被更改,包括 164 次插入 和 185 次删除
-
90Assets/Scripts/GameLobby/Game/GameManager.cs
-
90Assets/Scripts/GameLobby/Game/LobbyUser.cs
-
50Assets/Scripts/GameLobby/Game/LocalLobby.cs
-
41Assets/Scripts/GameLobby/Lobby/LobbyConverters.cs
-
6Assets/Scripts/GameLobby/Lobby/LobbyManager.cs
-
10Assets/Scripts/GameLobby/Lobby/LobbySynchronizer.cs
-
8Assets/Scripts/GameLobby/Relay/RelayUtpClient.cs
-
4Assets/Scripts/GameLobby/Relay/RelayUtpHost.cs
-
2Assets/Scripts/GameLobby/UI/JoinMenuUI.cs
-
4Assets/Scripts/GameLobby/UI/RecolorForLobbyType.cs
-
44Assets/Scripts/GameLobby/UI/ShowWhenLobbyStateUI.cs
|
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRelaySample.UI |
|||
{ |
|||
/// <summary>
|
|||
/// UI element that is displayed when the lobby is in a particular state (e.g. counting down, in-game).
|
|||
/// </summary>
|
|||
public class ShowWhenLobbyStateUI : ObserverPanel<LocalLobby> |
|||
{ |
|||
[SerializeField] |
|||
LobbyState m_ShowThisWhen; |
|||
|
|||
public override void ObservedUpdated(LocalLobby observed) |
|||
{ |
|||
if (m_ShowThisWhen.HasFlag(observed.State)) |
|||
Show(); |
|||
else |
|||
Hide(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRelaySample.UI |
|||
{ |
|||
/// <summary>
|
|||
/// UI element that is displayed when the lobby is in a particular state (e.g. counting down, in-game).
|
|||
/// </summary>
|
|||
public class ShowWhenLobbyStateUI : ObserverPanel<LocalLobby> |
|||
{ |
|||
[SerializeField] |
|||
LobbyState m_ShowThisWhen; |
|||
|
|||
public override void ObservedUpdated(LocalLobby observed) |
|||
{ |
|||
if (m_ShowThisWhen.HasFlag(observed.LobbyState)) |
|||
Show(); |
|||
else |
|||
Hide(); |
|||
} |
|||
} |
|||
} |
|||
|
撰写
预览
正在加载...
取消
保存
Reference in new issue