public void Next() { if (state == 0) { ballPointer.SetActive(false); } state++; // if (state > 1) { states [state - 1].SetActive(false); // } // if (state == 3 || state == 4) { // StartCoroutine (NextAfterDelay ()); // } if (state == states.Length) { foreach (Transform child in tutorialClouds.transform) { if (!child.GetComponent <SpriteRenderer> ().isVisible) { Destroy(child.gameObject); } } Player.instance.isTutorialOver = true; Player.instance.Reset(); UIManager.instance.OnTutorialCompleted(); GameManager.instance.OnTutorialCompleted(); PlayerPrefs.SetInt("Tutorial", 1); CustomAnalytics.Event("TutorialCompleted"); End(); } else { states [state].SetActive(true); } }
public void ContinueScreen() { gameScreen.SetActive(false); Time.timeScale = 0f; if (!Player.instance.isTutorialOver) { tutorial.End(); GameOver(); return; } // #if UNITY_EDITOR // if (restartAttempts == maxRestartAttempts) { // GameOver(); // return; // } // #else // if (restartAttempts == maxRestartAttempts || !SkyRiseAds.instance.IsRewarededInterLoaded ()) { // GameOver(); // return; // } // #endif // restartAttempts++; // #if !UNITY_EDITOR // SkyRiseAds.instance.Init (); // #endif CustomAnalytics.Event("LevelQuit" + level); continueScreen.SetActive(true); }
void Awake() { rateUsState = (RateUsState)PlayerPrefs.GetInt("RateUs", 0); level = 1; CustomAnalytics.Event("Level" + level); instance = this; // restartAttempts = 0; UpdateDiamondsText(); }
public void Continue() { CustomAnalytics.Event("ContinueVideo"); continueScreenMono.videoWatchCount++; continueScreen.SetActive(false); #if UNITY_EDITOR ContinueSuccess(); #else SkyRiseAds.instance.ShowRewardedInterstitial(ContinueSuccess, GameOver); #endif }
public void UpdateLevelText() { if (level == PatternManager.instance.patterns.Length) { return; } else { level++; CustomAnalytics.Event("Level" + level); } levelText.text = level.ToString(); }
public void ContinueViaDiamonds() { if (Shop.Instance.diamonds >= continueScreenMono.diamonds) { CustomAnalytics.Event("ContinueDiamonds" + continueScreenMono.diamonds); Shop.Instance.UpdateDiamonds(-continueScreenMono.diamonds); continueScreenMono.diamonds += 5; ContinueSuccess(); } else { notEnoughDiamonds.SetActive(true); } }
void AddDiamonds() { CustomAnalytics.Event("ShopVideo"); shop.UpdateDiamonds(2); diamonds.text = shop.diamonds.ToString(); }
public void BuyBall(int value) { CustomAnalytics.Event("BuyBall" + value); ballStates [value] = true; }