// 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);
    }
        protected override void InitTransitions()
        {
            transitionManager.Configure(TestTraceState.A).
            Permit(TestTraceTrigger.AtoA, TestTraceState.A, mode).
            Permit(TestTraceTrigger.AtoB, TestTraceState.B, mode).
            Permit(TestTraceTrigger.AtoC, TestTraceState.C, mode);

            transitionManager.Configure(TestTraceState.B).
            Permit(TestTraceTrigger.BtoC, TestTraceState.C);

            transitionManager.Configure(TestTraceState.C).
            Permit(TestTraceTrigger.CtoA, TestTraceState.A);

            StateMachineDebugger.Create(gameObject, stateMachine, transitionManager);
        }
        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);
        }