private bool CheckPossibleOpenBox(Box box)
    {
        bool possible = false;

        switch (box.CostMethod)
        {
        case Box.CostType.Coins:
            possible = TitlePanelManager.TryTakeCoins(box.Cost);
            break;

        case Box.CostType.Gems:
            possible = TitlePanelManager.TryTakeGems(box.Cost);
            break;

        case Box.CostType.Free:
            possible = true;
            break;

        case Box.CostType.ADS:
            possible = ADSManager.IsRewardedAdReady();
            break;
        }

        return(possible);
    }
예제 #2
0
 public void OnGetExtraLifeBtn()
 {
     ADSManager.ShowADS("rewardedVideo");
     life++;
     secondChance = true;
     Restart();
     getExtraLifeBtn.SetActive(false);
 }
예제 #3
0
    private void Awake()
    {
        instance = this;

        if (!RuntimeManager.IsInitialized())
        {
            RuntimeManager.Init();
        }
    }
예제 #4
0
    private bool IsADSReady()
    {
        bool Ready = ADSManager.IsRewardedAdReady();

        CoinsShowADSButton.Interactable   = Ready;
        GemsShowADSButton.Interactable    = Ready;
        TicketsShowADSButton.Interactable = Ready;

        return(Ready);
    }
예제 #5
0
    private void Awake()
    {
        ADSManager.Init();
        Cursor.visible = false;
        Instance       = this;
        Helper.Set2DCameraToObject(field);
#if UNITY_ANDROID
        if (PlayerPrefs.GetString("AndroidInput") == "TAP")
        {
            isTap = true;
        }
        else
        {
            isTap = false;
        }
#endif
    }
예제 #6
0
 private void Awake()
 {
     instance = this;
 }