Beispiel #1
0
 private void Awake()
 {
     repairTimer = 7f;
     controller  = GameObject.Find("Controller");
     MainUI.SetActive(true);
     RepairUI.SetActive(false);
     FallUI.SetActive(false);
 }
Beispiel #2
0
 private void Update()
 {
     if (controller.GetComponent <GameManager>().isBroken == false)
     {
         MetrsChecker();
     }
     if (controller.GetComponent <GameManager>().isBroken)
     {
         MainUI.SetActive(false);
         RepairUI.SetActive(false);
         FallUI.SetActive(true);
         GameOver.SetActive(false);
     }
     else
     {
         RepairUI.SetActive(false);
     }
     if (controller.GetComponent <GameManager>().isRepair)
     {
         MainUI.SetActive(false);
         RepairUI.SetActive(true);
         FallUI.SetActive(false);
         GameOver.SetActive(false);
         Timer();
     }
     if (controller.GetComponent <GameManager>().isGameOver)
     {
         MainUI.SetActive(false);
         RepairUI.SetActive(false);
         FallUI.SetActive(false);
         GameOver.SetActive(true);
     }
     if (repairTimer <= 0)
     {
         if (oneMore)
         {
             controller.GetComponent <GameManager>().TimerEndFunction();
             oneMore     = false;
             repairTimer = 7f;
         }
         oneMore = true;
     }
 }