/// <summary> /// same as changestate but doesnt delete old state(ie pause game, bringup menu) /// </summary> /// <param name="ai">The AI routine to be pushed onto the stack</param> internal void PushState(Airoutine ai) { CurrentAI.Push(ai); }
/// <summary> /// Pushes a new state onto the stack, calls the states Init method, deletes old state(ie launch game, nuke menu) /// </summary> /// <param name="ai">The AI to be pushed onto the stack</param> internal void ChangeState(Airoutine ai) { if (CurrentAI.Count != 0) { CurrentAI.Pop(); } CurrentAI.Push(ai); }