示例#1
0
    private IEnumerator RedSignal()
    {
        isSignalCoroutineEnd = false;
        SetPedestrianColliderStatus(false);

        VisualizeTrafficLightSignal(trafficLightLogic.TrafficLightSignal);
        delay = trafficLightLogic.CalculateDelay(levelData.levelNumber);

        Debug.Log($"{gameObject.name} : {trafficLightLogic.TrafficLightSignal} : {delay}s");

        yield return(new WaitForSeconds(delay));

        previousSignal = TrafficLightSignal.RedLight;
        trafficLightLogic.TrafficLightSignal = TrafficLightSignal.YellowLight;
        SetPedestrianColliderStatus(true);
        isSignalCoroutineEnd = true;
    }