rc
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user