public void Play(AdsManager.AdType type, Action finishCallback = null, Action cancelCallback = null, int awardValue = 5, Action unLoadCallfunc = null) { switch (type) { case AdsManager.AdType.Stimulate: //이미 시청줌 if (!this.m_isWatch) { //ToastManager.Show("TXT_NO_50013", true); Debug.Log("이미시청"); return; } if (!AdsControl.Instance.Check_Rewaed()) { //ToastManager.Show("TXT_NO_50013", true); Debug.Log("아 없다고...."); return; } Debug.Log("아님 뭐냐...."); GM.GetInstance().IsPlayVedioAds = true; this.m_isWatch = false; AdsControl.Instance.reward_Type = Reward_Type.stimulate; AdsControl.Instance.awardValue = awardValue; AdsControl.Instance.ShowRewardedAd(); TaskData.GetInstance().Add(100105, 1, true); AdsManager.GetInstance().SaveVedioTime(); AdsManager.GetInstance().M_preVedioTime = AdsManager.GetInstance().GetPreVedioTime(); GM.GetInstance().IsPlayVedioAds = false; Debug.Log("끝...."); //AppsflyerUtils.TrackVedioError((int)type); if (unLoadCallfunc != null) { unLoadCallfunc(); return; } break; case AdsManager.AdType.GotoMainPage: case AdsManager.AdType.GetTask: case AdsManager.AdType.GetAchiev: case AdsManager.AdType.Refresh: case AdsManager.AdType.Continue: case AdsManager.AdType.Finish: case AdsManager.AdType.ForceGround: if (!this.isShowAds()) { Action expr_2F6 = finishCallback; if (expr_2F6 == null) { return; } expr_2F6(); return; } else { if (AdsUtil.isInsertISAdsLoaded()) { AdsUtil.showInsertISAds(delegate { Action expr_06 = finishCallback; if (expr_06 == null) { return; } expr_06(); }, null); return; } if (AdsUtil.isInsertAdsLoaded()) { AdsUtil.showInsertAds(delegate { Action expr_06 = finishCallback; if (expr_06 == null) { return; } expr_06(); }, null); return; } Action expr_33D = finishCallback; if (expr_33D == null) { return; } expr_33D(); } break; case AdsManager.AdType.ResetLife: case AdsManager.AdType.UseProp: case AdsManager.AdType.ResetLife2: //AppsflyerUtils.TrackClickVedio((int)type); GM.GetInstance().IsPlayVedioAds = true; if (AdsUtil.isRewardAdsLoaded()) { AdsUtil.showRewardAds(delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = finishCallback; if (expr_11 != null) { expr_11(); } //AppsflyerUtils.TrackVedio((int)type); }, delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = cancelCallback; if (expr_11 == null) { return; } expr_11(); }); return; } if (AdsUtil.isRewardISAdsLoaded()) { AdsUtil.showRewardISAds(delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = finishCallback; if (expr_11 != null) { expr_11(); } //AppsflyerUtils.TrackVedio((int)type); }, delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = cancelCallback; if (expr_11 == null) { return; } expr_11(); }); return; } ToastManager.Show("TXT_NO_50014", true); GM.GetInstance().IsPlayVedioAds = false; ///AppsflyerUtils.TrackVedioError((int)type); if (unLoadCallfunc != null) { unLoadCallfunc(); return; } break; case AdsManager.AdType.MultiAwards: //AppsflyerUtils.TrackClickVedio((int)type); GM.GetInstance().IsPlayVedioAds = true; AdsControl.Instance.ShowRewardedAd(); GM.GetInstance().AddDiamond(awardValue * 2, true); DialogManager.GetInstance().Close(null); GM.GetInstance().IsPlayVedioAds = false; return; case AdsManager.AdType.Skin: ///AppsflyerUtils.TrackClickVedio((int)type); GM.GetInstance().IsPlayVedioAds = true; if (AdsUtil.isRewardAdsLoaded()) { AdsUtil.showRewardAds(delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = finishCallback; if (expr_11 != null) { expr_11(); } /// AppsflyerUtils.TrackVedio((int)type); }, delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = cancelCallback; if (expr_11 == null) { return; } expr_11(); }); return; } if (AdsUtil.isRewardISAdsLoaded()) { AdsUtil.showRewardISAds(delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = finishCallback; if (expr_11 != null) { expr_11(); } /// AppsflyerUtils.TrackVedio((int)type); }, delegate { GM.GetInstance().IsPlayVedioAds = false; Action expr_11 = cancelCallback; if (expr_11 == null) { return; } expr_11(); }); return; } ToastManager.Show("TXT_NO_50014", true); GM.GetInstance().IsPlayVedioAds = false; ////AppsflyerUtils.TrackVedioError((int)type); if (unLoadCallfunc != null) { unLoadCallfunc(); return; } break; default: return; } }
public static void Initialize() { TaskData.GetInstance().Read(); }