Exemplo n.º 1
0
    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);
        }
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
    void Awake()
    {
        rateUsState = (RateUsState)PlayerPrefs.GetInt("RateUs", 0);
        level       = 1;
        CustomAnalytics.Event("Level" + level);
        instance = this;
//		restartAttempts = 0;
        UpdateDiamondsText();
    }
Exemplo n.º 4
0
 public void Continue()
 {
     CustomAnalytics.Event("ContinueVideo");
     continueScreenMono.videoWatchCount++;
     continueScreen.SetActive(false);
             #if UNITY_EDITOR
     ContinueSuccess();
             #else
     SkyRiseAds.instance.ShowRewardedInterstitial(ContinueSuccess, GameOver);
             #endif
 }
Exemplo n.º 5
0
 public void UpdateLevelText()
 {
     if (level == PatternManager.instance.patterns.Length)
     {
         return;
     }
     else
     {
         level++;
         CustomAnalytics.Event("Level" + level);
     }
     levelText.text = level.ToString();
 }
Exemplo n.º 6
0
 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);
     }
 }
Exemplo n.º 7
0
 void AddDiamonds()
 {
     CustomAnalytics.Event("ShopVideo");
     shop.UpdateDiamonds(2);
     diamonds.text = shop.diamonds.ToString();
 }
Exemplo n.º 8
0
 public void BuyBall(int value)
 {
     CustomAnalytics.Event("BuyBall" + value);
     ballStates [value] = true;
 }