This commit is contained in:
2026-08-20 19:45:38 +05:30
parent 74d9fae6e6
commit 78592e8d8e
87 changed files with 13154 additions and 223 deletions
+31 -9
View File
@@ -141,6 +141,24 @@ public class MainMenuManager : MonoBehaviour
}
void OnLogout()
{
if (MessageBoxDialog.IsAvailable)
{
MessageBoxDialog.Show(
"Log out?",
"You will need to sign in again to play.",
confirmed =>
{
if (confirmed)
ConfirmLogout();
});
return;
}
ConfirmLogout();
}
void ConfirmLogout()
{
LoginManager.Logout();
SceneManager.LoadScene(0);
@@ -165,7 +183,17 @@ public class MainMenuManager : MonoBehaviour
}
if (LoginManager.CurrentUser.rc < _matchEntryFeeCoins)
{
Debug.LogError("Not enough RC to play");
string fee = CoinHelper.FormatString(_matchEntryFeeCoins) + " RC";
if (MessageBoxDialog.IsAvailable)
{
MessageBoxDialog.Show(
"Not enough RC",
"You need " + fee + " to play. Buy more RC and try again.");
}
else
{
Debug.LogError("Not enough RC to play");
}
return;
}
if (CupidLobby.instance == null)
@@ -285,16 +313,10 @@ public class MainMenuManager : MonoBehaviour
ccText.text = user.cc.ToString("N0") + " CC";
rcText.text = CoinHelper.FormatString(user.rc) + " RC";
if (LoginManager.CurrentUser.rc < _matchEntryFeeCoins)
{
rcPlayText.text = "Not enough RC to play";
btnPlay.interactable = false;
}
else
{
if (rcPlayText != null)
rcPlayText.text = "";
if (btnPlay != null)
btnPlay.interactable = true;
}
UpdateWithdrawalStatus(user);
}