示例#1
0
    public void ChangeState(Type stateType)
    {
        if (stateDic.ContainsKey(stateType))
        {
            BaseFSM <T> fsm = stateDic[stateType];

            if (fsm != null)
            {
                currentStateType = stateType;
                previousState    = currentState;
                currentState     = fsm;
                currentState.Begin();
            }
        }
    }