Esempio n. 1
0
 public static RedState GetInstance()
 {
     if (_rsInstance == null)
     {
         _rsInstance = new RedState();
     }
     return(_rsInstance);
 }
Esempio n. 2
0
 public IState Next(TrafficLight tl)
 {
     tl.CurrentLight = Light.Red;
     return(RedState.GetInstance());
 }