void Start() { redState = new RedState(this); blueState = new BlueState(this); yellowState = new YellowState(this); currentState = yellowState; }
// Use this for initialization void Start() { bulbs.Add("Red", objs[2]); bulbs.Add("Green", objs[0]); bulbs.Add("Yellow", objs[1]); greenState = new GreenState(this); redState = new RedState(this); yellowState = new YellowState(this); currentState = redState; m_timer = 0f; }