public State <T> AddStateWithTasks(T id, OnAsyncEnterCallback <T> onEnterCB, OnAsyncExitCallback <T> onExitCB)
        {
            State <T> state = new State <T>(id, onEnterCB, onExitCB);

            AddState(id, state);
            return(state);
        }
        public State <T> AddState(T id, OnAsyncEnterCallback <T> onEnterCB, OnSyncExitCallback <T> onExitCB)
        {
            UniTask OnExit(T to)
            {
                onExitCB(to); return(UniTask.CompletedTask);
            }

            State <T> state = new State <T>(id, onEnterCB, OnExit);

            AddState(id, state);
            return(state);
        }
 public State <T> AddState(T id, OnAsyncEnterCallback <T> onEnterCB, OnAsyncExitCallback <T> onExitCB)
 {
     return(AddStateWithTasks(id, onEnterCB, onExitCB));
 }
 public State(T id, OnAsyncEnterCallback <T> onEnter, OnAsyncExitCallback <T> onExit)
 {
     ID        = id;
     OnEnterCB = onEnter;
     OnExitCB  = onExit;
 }