Esempio n. 1
0
 public IEnumerator CountDown()
 {
     if (isGameOver)
     {
         PlayerPrefs.SetInt("GameAdsCount", PlayerPrefs.GetInt("GameAdsCount"));
         EndGameUI.SetActive(false);
         CountDownUI.SetActive(true);
         for (i = 3; i > 0; i--)
         {
             CountDownText.text = i.ToString();
             CountDownText.gameObject.transform.localScale = Vector3.one;
             CountDownText.gameObject.transform.DOScale(Vector3.zero, 1f).SetEase(Ease.Linear);
             yield return(new WaitForSeconds(1f));
         }
         if (i == 0)
         {
             ResumeGame();
         }
     }
     else
     {
         yield return(null);
     }
 }
Esempio n. 2
0
 private void Awake()
 {
     instance = this;
 }
Esempio n. 3
0
 public void ResumeGame()
 {
     InGameUI.SetActive(true);
     CountDownUI.SetActive(false);
     SpaceShipController.instance.ResumeGame();
 }