Ejemplo n.º 1
0
        //[SetUp]
        //public void SetUp()
        //{
        //}

        //[TearDown]
        //public void TearDown()
        //{
        //}

        private TestFSM GetFSM()
        {
            var fsm  = new TestFSM(_factories);
            var init = fsm as IInitializable;

            if (init.IsValid())
            {
                init.Initialize();
            }

            return(fsm);
        }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        m_testfsm = new TestFSM();

        // Move from IDLE to TARGETING
        m_testfsm.AddTransition(AIStates.IDLE, AIStates.TARGETING, Target);
        // Move from TARGETING to IDLE
        m_testfsm.AddTransition(AIStates.TARGETING, AIStates.IDLE, Idle);
        // Move from TARGETING to ATTACK
        m_testfsm.AddTransition(AIStates.TARGETING, AIStates.ATTACK, Attack);
        // Move from ATTACK to DONE
        m_testfsm.AddTransition(AIStates.ATTACK, AIStates.DONE, Done);
    }