Esempio n. 1
0
        IEnumerator WatchRaceStatus()
        {
            //Debug.Log("UiManager.WatchRaceStatus");

            while (RaceManager.IsRaceInProgress() == false)
            {
                yield return(null);
            }

            CountdownTimerHud.Hide();

            raceButton.GetComponentInChildren <Text>().text = Constants.StopRace;
            raceInfoHud.StartWatchRaceStatus();

            while (RaceManager.IsRaceInProgress() == true)
            {
                yield return(new WaitForSeconds(0.1f));
            }

            if (RaceManager.IsReady())
            {
                closeRaceInfoHudButton.gameObject.SetActive(true);
            }

            raceButton.GetComponentInChildren <Text>().text = Constants.StartRace;
        }
Esempio n. 2
0
 void ResetFlightPanel()
 {
     GameManager.StopGame();
     RaceManager.StopRace();
     HideRaceInfoHud();
     CountdownTimerHud.Hide();
     HideArmedIndicator();
     raceButton.GetComponentInChildren <Text>().text = Constants.StartRace;
 }
Esempio n. 3
0
        void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }
            else
            {
                Debug.LogError("CountdownTimerUi has already been created.");
            }

            Hide(true);
        }
Esempio n. 4
0
        public void Race()
        {
            if (RaceManager.IsRaceInProgress() == true)
            {
                RaceManager.StopRace();
            }
            else if (RaceManager.IsGetReady() == false)
            {
                raceButton.GetComponentInChildren <Text>().text = Constants.GetReadyToRace;

                RaceManager.GetReadyToRace();

                CountdownTimerHud.Show();

                closeRaceInfoHudButton.gameObject.SetActive(false);
                raceInfoHud.gameObject.SetActive(true);
                raceInfoHud.StartWatchRaceStatus();

                StartCoroutine(WatchRaceStatus());
            }
        }