예제 #1
0
 public static ToRedState GetInstance()
 {
     if (_trsInstance == null)
     {
         _trsInstance = new ToRedState();
     }
     return(_trsInstance);
 }
예제 #2
0
 public IState Next(TrafficLight tl)
 {
     tl.CurrentLight = Light.Yello;
     return(ToRedState.GetInstance());
 }