public static ToGreenState GetInstance() { if (_tgsInstance == null) { _tgsInstance = new ToGreenState(); } return(_tgsInstance); }
public IState Next(TrafficLight tl) { tl.CurrentLight = Light.Yello; return(ToGreenState.GetInstance()); }