Пример #1
0
 void Update()
 {
     if (BRGameController.CurrentRaceState() == RaceState.RACING)
     {
         placeText.enabled = true;
         timerText.enabled = true;
     }
     else
     {
         placeText.enabled = false;
         timerText.enabled = false;
     }
 }
Пример #2
0
    void FixedUpdate()
    {
        RaceState state = BRGameController.CurrentRaceState();

        bool canStart = false;
        bool canStop  = false;

        switch (state)
        {
        case RaceState.LOBBY:
            canStart = true;
            break;

        case RaceState.RACING:
            canStop = true;
            break;
        }
        startObj.SetActive(canStart);
        stopObj.SetActive(canStop);
    }