public void ChangeState(AiStateInterface <T> e) { PreviousState = currentState; if (currentState != null) { currentState.Exit(Holder); } currentState = e; if (currentState != null) { currentState.Enter(Holder); } }
protected void Configure(T holder, AiStateInterface <T> initState) { Holder = holder; ChangeState(initState); }