Skip to content

Commit 3a35032

Browse files
Merge branch 'develop' into fix/more-lobby-visual-work
# Conflicts resolved with unity merge tool: # Assets/BossRoom/Scenes/MainMenu.unity # Assets/BossRoom/Scripts/Client/UI/IPUIMediator.cs
2 parents b6ae11d + 7c5f64e commit 3a35032

File tree

4 files changed

+19
-24
lines changed

4 files changed

+19
-24
lines changed

Assets/BossRoom/Scenes/MainMenu.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:5790cc2f653d56216f8d97d9759232fc2fb26b956469cb2b2ff1450613e20f82
3-
size 70413
2+
oid sha256:c35a9ba013ee2c28224c5aaee30e2ce0b8b3773c1c24cf119b643d7a9acdead7
3+
size 84071

Assets/BossRoom/Scripts/Client/Game/State/ClientMainMenuState.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class ClientMainMenuState : GameStateBehaviour
2929

3030
[SerializeField] NameGenerationData m_NameGenerationData;
3131
[SerializeField] LobbyUIMediator m_LobbyUIMediator;
32+
[SerializeField] IPUIMediator m_IPUIMediator;
3233

3334
[SerializeField] CanvasGroup m_MainMenuButtonsCanvasGroup;
3435
[SerializeField] GameObject m_SignInSpinner;
@@ -47,6 +48,7 @@ void InjectDependenciesAndInitialize(AuthenticationServiceFacade authServiceFaca
4748

4849
m_Scope.BindInstanceAsSingle(m_NameGenerationData);
4950
m_Scope.BindInstanceAsSingle(m_LobbyUIMediator);
51+
m_Scope.BindInstanceAsSingle(m_IPUIMediator);
5052

5153
var unityAuthenticationInitOptions = new InitializationOptions();
5254

@@ -115,5 +117,11 @@ public void OnStartClicked()
115117
m_LobbyUIMediator.ToggleJoinLobbyUI();
116118
m_LobbyUIMediator.Show();
117119
}
120+
121+
public void OnDirectIPClicked()
122+
{
123+
m_LobbyUIMediator.Hide();
124+
m_IPUIMediator.Show();
125+
}
118126
}
119127
}

Assets/BossRoom/Scripts/Client/UI/IPUIMediator.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class IPUIMediator : MonoBehaviour
3131
[SerializeField] UITinter m_JoinTabButtonTabBlockerTinter;
3232

3333
[SerializeField] UITinter m_HostTabButtonTinter;
34-
34+
3535
[SerializeField] UITinter m_HostTabButtonHighlightTinter;
3636

3737
[SerializeField] UITinter m_HostTabButtonTabBlockerTinter;
@@ -67,22 +67,6 @@ void Start()
6767
ToggleCreateIPUI();
6868
}
6969

70-
void Update()
71-
{
72-
if (Input.touchCount == k_NbTouchesToOpenWindow && AnyTouchDown() ||
73-
m_OpenIPWindowKeyCode != KeyCode.None && Input.GetKeyDown(m_OpenIPWindowKeyCode))
74-
{
75-
if (m_CanvasGroup.interactable)
76-
{
77-
Hide();
78-
}
79-
else
80-
{
81-
Show();
82-
}
83-
}
84-
}
85-
8670
static bool AnyTouchDown()
8771
{
8872
foreach (var touch in Input.touches)

Assets/BossRoom/Scripts/Client/UI/UnityServicesUIHandler.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ void ServiceErrorHandler(UnityServiceErrorMessage error)
2727
var errorMessage = error.Message;
2828
if (error.AffectedService == UnityServiceErrorMessage.Service.Lobby)
2929
{
30-
if ((error.OriginalException as LobbyServiceException).Reason == LobbyExceptionReason.LobbyConflict)
30+
if (error.OriginalException is LobbyServiceException lobbyServiceException)
3131
{
32-
// LobbyConflict can have multiple causes. Let's add other solutions here if there's other situations that arise for this.
33-
errorMessage += "\nSee logs for possible causes and solution.";
34-
Debug.LogError($"Got service error {error.Message} with LobbyConflict. Possible conflict cause: Trying to play with two builds on the " +
35-
$"same machine. Please use command line arg '{ClientMainMenuState.AuthProfileCommandLineArg} someName' to set a different auth profile.\n");
32+
if (lobbyServiceException.Reason == LobbyExceptionReason.LobbyConflict)
33+
{
34+
// LobbyConflict can have multiple causes. Let's add other solutions here if there's other situations that arise for this.
35+
errorMessage += "\nSee logs for possible causes and solution.";
36+
Debug.LogError($"Got service error {error.Message} with LobbyConflict. Possible conflict cause: Trying to play with two builds on the " +
37+
$"same machine. Please use command line arg '{ClientMainMenuState.AuthProfileCommandLineArg} someName' to set a different auth profile.\n");
38+
}
3639
}
3740
}
3841

0 commit comments

Comments
 (0)