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