public void changeState(NpcState <T> _newstate) { if (current_state != null) { current_state.EnterState(owner); } current_state = _newstate; current_state.EnterState(owner); }
//constructor public NpcStateMachine(T _o) { owner = _o; current_state = null; }