Пример #1
0
 //신호는 차량기준
 private void OnSignalChange(ETrafficLightState _Signal)
 {
     if (_Signal == ETrafficLightState.Red)
     {
         ChangeAllAgentsAreaMask(EAreaMask.Walkable_CrossWalk);
     }
     else
     {
         ChangeAllAgentsAreaMask(EAreaMask.Walkable);
     }
 }
Пример #2
0
    IEnumerator CChangeTrafficLightSignal()
    {
        OnSignalChanged?.Invoke(Signal);

        Signal += 1;

        yield return(TrafficLightChangeDelayTime);

        //None 즉 ETrafficLightState의 끝에오면 처음으로 바꿈
        if (Signal == ETrafficLightState.None)
        {
            Signal = 0;
        }

        StartCoroutine(CChangeTrafficLightSignal());
    }