Пример #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);
     }
 }
Пример #2
0
 public void ResumeGame()
 {
     InGameUI.SetActive(true);
     CountDownUI.SetActive(false);
     SpaceShipController.instance.ResumeGame();
 }