Exemplo n.º 1
0
 public void StartGame()
 {
     ads = gameObject.GetComponent <Advirst>();
     if (Random.Range(0, 5) == 1)
     {
         //ads.ShowVideo();
     }
     Time.timeScale = 1;
     SceneManager.LoadScene(1);
 }
Exemplo n.º 2
0
 public void RestartGame()
 {
     PlayerPrefs.SetInt("isEnabled", 1);
     PlayerPrefs.SetInt("scoreNow", 0);
     ads = gameObject.GetComponent <Advirst>();
     if (Random.Range(0, 5) == 1)
     {
         //  ads.ShowVideo();
     }
     Time.timeScale = 1;
     SceneManager.LoadScene(1);
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     if (PlayerPrefs.GetInt("isEnabled") == 2)
     {
         but.interactable = false;
     }
     else
     {
         but.interactable = true;
     }
     ads = gameObject.GetComponent <Advirst>();
     PlayerPrefs.SetString("timerMax", "00");
     ui             = gameObject.GetComponent <UIManager>();
     score          = PlayerPrefs.GetInt("scoreNow");
     scoreText.text = score.ToString();
     isTimer        = true;
     timer          = PlayerPrefs.GetFloat("timer");
     timerMax.text  = PlayerPrefs.GetString("timerMax");
     shake          = gameObject.GetComponent <Shake>();
     curСountSpawn  = countSpawn;
     CheckDif();
 }