private void OnRefreshAdsTimer(string timer, bool isWatch) { this.txt_ads_timer.text = timer; if (AdsManager.GetInstance().IsWatch) { this.txt_ads_timer.GetComponent <LanguageComponent>().SetText("TXT_NO_50139"); } }
public void Awake() { gameObject.SetActive(false); MainMenuButton.onClick.AddListener(() => { SceneManager.LoadSceneAsync(0); AdsManager.GetInstance().ShowAd(); } ); }
public void Start() { var instance = AdsManager.GetInstance(); while (!instance.AdsIsLoad()) { } instance.ShowAd(); }
private void InitUI() { if (AdsManager.GetInstance().IsWatch) { this.txt_ads_timer.GetComponent <LanguageComponent>().SetText("TXT_NO_50139"); } this.LoadDiamondUI(); this.LoadExpUI(); this.PlayGENTipAni(); }
public void OnClickAds() { AdsManager.GetInstance().Play(AdsManager.AdType.ResetLife, delegate { GM.GetInstance().SetSavedGameID(this.gameID); Game1DataLoader.GetInstance().FillLife(false); Game1DataLoader.GetInstance().DoFillLife(); DialogManager.GetInstance().Close(null); }, null, 5, null); }
private void InitUI() { if (AdsManager.GetInstance().IsWatch) { this.m_videoTimer.GetComponent <LanguageComponent>().SetText("TXT_NO_50139"); } if (AdsManager.GetInstance().IsWatch) { this.PlayAdsTipAni(); } if (this.m_items == null || this.m_sprites == null) { return; } List <int> skinData = GM.GetInstance().GetSkinData(); int num = 0; while (num < this.m_items.Length && num < skinData.Count) { int num2 = skinData[num]; GameObject gameObject = this.m_items[num]; switch (num2) { case 0: if (GM.GetInstance().SkinID == num + 1) { gameObject.transform.Find("img_status").GetComponent <Image>().sprite = this.m_sprites[1]; } else { gameObject.transform.Find("img_status").GetComponent <Image>().sprite = this.m_sprites[0]; } break; case 1: gameObject.transform.Find("img_status").GetComponent <Image>().sprite = this.m_sprites[2]; break; case 2: if (GM.GetInstance().SkinID == num + 1) { gameObject.transform.Find("img_status").GetComponent <Image>().sprite = this.m_sprites[1]; } else { gameObject.transform.Find("img_status").GetComponent <Image>().sprite = this.m_sprites[0]; } break; } num++; } }
public static void ShowVideoConfirm(int value, string txtID = "TXT_NO_50025", Confirm.ConfirmType type = Confirm.ConfirmType.VIDEO2) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(Resources.Load("Prefabs/confirm02") as GameObject); gameObject.GetComponent <Confirm>().SetText(txtID, true); gameObject.GetComponent <Confirm>().SetValue(value); gameObject.GetComponent <Confirm>().SetType(type); gameObject.GetComponent <Confirm>().SetCallFunc(delegate { AdsManager.GetInstance().Play(AdsManager.AdType.MultiAwards, null, null, value, null); }, null); DialogManager.GetInstance().show(gameObject, false); }
private void OnApplicationPause(bool pause) { if (pause) { GameList.Instance.Pause_Return(); GlobalTimer.GetInstance().TrackMiniTime(); GlobalTimer.GetInstance().TrackTotalTime(); AdsManager.GetInstance().SaveInsertTime(); return; } AdsUtil.LoadRewardAds(); AdsManager.GetInstance().PlayTransiformGroundAds(); }
private void OnRefreshAdsTimer(string timer, bool isWatch) { this.m_videoTimer.text = timer; if (AdsManager.GetInstance().IsWatch) { this.m_videoTimer.GetComponent <LanguageComponent>().SetText("TXT_NO_50139"); } if (isWatch) { this.PlayAdsTipAni(); return; } this.StopAdsTipsAni(); }
public void OnClickAds() { AdsManager.GetInstance().Play(AdsManager.AdType.UseProp, delegate { GM.GetInstance().SetSavedGameID(this.gameID); DialogManager.GetInstance().Close(null); Action _action = G2BoardGenerator.GetInstance().DoVedioRefresh; if (_action == null) { return; } _action(); }, null, 5, null); }
public void OnClickRefresh() { if (GM.GetInstance().IsRandomStatus(50)) { AdsManager.GetInstance().Play(AdsManager.AdType.Refresh, delegate { Action _action = this.OnClickRefreshHandle; if (_action == null) { return; } _action(); }, null, 5, null); } else { Action _action2 = this.OnClickRefreshHandle; if (_action2 != null) { _action2(); } } switch (GM.GetInstance().GameId) { case 1: FireBaseManager.Instance.LogEvent("Puzzle_Mix_Pause_Retry"); break; case 2: FireBaseManager.Instance.LogEvent("2048_Pause_Retry"); break; case 3: FireBaseManager.Instance.LogEvent("Puzzle_Line_Pause_Retry"); break; default: break; } DialogManager.GetInstance().Close(null); }
internal void _ShowVideoConfirm_b__0() { AdsManager.GetInstance().Play(AdsManager.AdType.MultiAwards, null, null, this.value, null); }
public void CheckAds() { this.m_adsDot.SetActive(AdsManager.GetInstance().IsWatch); }
public void InitAdsManager(IUnityAdsListener listener) { adsManager = AdsManager.GetInstance(UNITY_APP_ADS_ID, listener); }
public void LoadGame(int id, int value = 0, bool isPageIn = true) { //this.PlayRecordAni(); if (AdsManager.GetInstance().IsWatch) { //this.m_videoTimer.GetComponent<LanguageComponent>().SetText("TXT_NO_20018"); } if (AdsManager.GetInstance().IsWatch) { } if (id == 0) { return; } foreach (KeyValuePair <int, GameObject> current in this.m_gameDict) { current.Value.SetActive(false); } if (this.m_gameDict.ContainsKey(id)) { this.m_gameDict[id].SetActive(true); switch (id) { case 1: FireBaseManager.Instance.LogEvent("Puzzle_Mix_Start"); Game1DataLoader.GetInstance().StartNewGame(); break; case 2: FireBaseManager.Instance.LogEvent("2048_Start"); G2BoardGenerator.GetInstance().StartNewGame(); break; case 3: FireBaseManager.Instance.LogEvent("Puzzle_Line_Start"); G3BoardGenerator.GetInstance().StartNewGame(value); break; } } else { Dictionary <int, string> dictionary = new Dictionary <int, string> { { 1, "Prefabs/G001" }, { 2, "Prefabs/G002" }, { 3, "Prefabs/G00301" } }; if (!dictionary.ContainsKey(id)) { return; } GameObject gameObject = Resources.Load(dictionary[id]) as GameObject; gameObject = UnityEngine.Object.Instantiate <GameObject>(gameObject); gameObject.transform.SetParent(this.content.transform, false); if (id == 3 && value != 0) { G3BoardGenerator.GetInstance().StartNewGame(value); } this.m_gameDict.Add(id, gameObject); } if (isPageIn) { this.PlayGameIn(); } //AppsflyerUtils.TrackPlayGame(id); }