void ShowInterstitial(string key, MyUnityEvent callback) { if (!IsAvailable) { callback.SafeInvoke(); return; } #if IMPORT_HYPERCOMMON AudioManager.Instance.SetMute(true); AdManager.Instance.ShowInterstitialWithKey(key, () => { AudioManager.Instance.SetMute(false); callback.SafeInvoke(); } , (error) => { AudioManager.Instance.SetMute(false); callback.SafeInvoke(); Debug.Log(error); }); #else callback.SafeInvoke(); #endif }
protected override void Awake() { Interactable = Button.interactable; button.onClick.AddListener(() => { if (isShowRewardVideo) { return; } isShowRewardVideo = true; MyAdManager.Instance.ShowRewardVideo(key, () => { isShowRewardVideo = false; if (OnClickEvent != null) { OnClickEvent.Invoke(); } }, () => { isShowRewardVideo = false; OnFailed.SafeInvoke(); }); }); scaleCurve = MyAnimationCurves.Instance.GetAnimationCurve(MyAnimationCurveType.Notification); }
protected override void Awake() { okButton.AddListener(() => OnOK.SafeInvoke()); noThanksButton.AddListener(() => OnNoThanks.SafeInvoke()); base.Awake(); }