reconnect, 30% fixes from test feedback
This commit is contained in:
@@ -36,6 +36,7 @@ public class MainMenuManager : MonoBehaviour
|
||||
public Button btnPaste;
|
||||
public TMP_InputField inputCryptoAddress;
|
||||
public TMP_Text txtWithdrawStatus;
|
||||
private bool isCoinBuyInProgress;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
@@ -146,14 +147,33 @@ public class MainMenuManager : MonoBehaviour
|
||||
}
|
||||
|
||||
void OnBuy(string packId){
|
||||
if (isCoinBuyInProgress)
|
||||
return;
|
||||
|
||||
isCoinBuyInProgress = true;
|
||||
SetCoinBuyButtonsInteractable(false);
|
||||
|
||||
LoginManager.instance.PurchaseRcPack(packId, (success, error) => {
|
||||
if(success){
|
||||
OnUserUpdated(LoginManager.CurrentUser);
|
||||
AudioManager.instance.PlayCoinsSfx();
|
||||
}
|
||||
|
||||
isCoinBuyInProgress = false;
|
||||
SetCoinBuyButtonsInteractable(true);
|
||||
});
|
||||
}
|
||||
|
||||
void SetCoinBuyButtonsInteractable(bool interactable)
|
||||
{
|
||||
if (btnBuyUsd5 != null)
|
||||
btnBuyUsd5.interactable = interactable;
|
||||
if (btnBuyUsd20 != null)
|
||||
btnBuyUsd20.interactable = interactable;
|
||||
if (btnBuyUsd50 != null)
|
||||
btnBuyUsd50.interactable = interactable;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
LoginManager.OnUserDataUpdated -= OnUserUpdated;
|
||||
|
||||
Reference in New Issue
Block a user