void Update() { if (BRGameController.CurrentRaceState() == RaceState.RACING) { placeText.enabled = true; timerText.enabled = true; } else { placeText.enabled = false; timerText.enabled = false; } }
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); }