// Use this for initialization
    void Start()
    {
        fsm = StateMachine <State> .Initialize(this, State.A, enableTransitionToSelfState);

        trm = new TransitionManager <Trigger, State>(fsm);
        StateMachineDebugger.Create(gameObject, fsm, trm);

        trm.Configure(State.A).Permit(Trigger.AtoB, State.B);
        trm.Configure(State.B).Permit(Trigger.BtoA, State.A);
        trm.PermitAll(Trigger.AlltoA, State.A);
        trm.PermitAll(Trigger.AlltoB, State.B, StateTransition.Overwrite).
        Remove(State.NotAffectedByGlobal, Trigger.AlltoA).
        Remove(State.NotAffectedByGlobal, Trigger.AlltoB);
    }
        private void Start()
        {
            fsm = StateMachine <TestState> .Initialize(this, TestState.A, true);

            trm = new TransitionManager <TestTrigger, TestState>(fsm);

            trm.Configure(TestState.A).
            Permit(TestTrigger.AtoB, TestState.B, mode).
            Permit(TestTrigger.AtoC, TestState.C, mode);

            trm.Configure(TestState.B).
            Permit(TestTrigger.BtoC, TestState.C);

            trm.Configure(TestState.C).
            Permit(TestTrigger.CtoA, TestState.A);


            StateMachineDebugger.Create(gameObject, fsm, trm);
        }