Admob crash fixed
This commit is contained in:
@@ -36,7 +36,7 @@ public class ChestButton : MonoBehaviour
|
||||
|
||||
void OnAdClicked(){
|
||||
Debug.Log("Showing ad");
|
||||
AdsManager.instance.ShowRewarded(Buy);
|
||||
AdsManager.instance.ShowRewarded(BuyFree);
|
||||
}
|
||||
|
||||
void Buy(){
|
||||
@@ -49,6 +49,16 @@ public class ChestButton : MonoBehaviour
|
||||
ChestOpener.instance.OpenChest((int)minLuck, (int)maxLuck);
|
||||
}
|
||||
|
||||
public void BuyFree(){
|
||||
// MessageDialog.instance.ShowMessage("Voila!", "Here's your gift!");
|
||||
StartCoroutine(buyFree());
|
||||
}
|
||||
|
||||
IEnumerator buyFree(){
|
||||
yield return new WaitForSeconds(1);
|
||||
ChestOpener.instance.OpenChest((int)minLuck, (int)maxLuck);
|
||||
}
|
||||
|
||||
public string getItemsProbability()
|
||||
{
|
||||
string items = "Gold";
|
||||
|
||||
Reference in New Issue
Block a user