Esempio n. 1
0
    void InitFsm()
    {
        fsm = new FSMSystem();
        PatrolState patrolState = new PatrolState(fsm);

        patrolState.ADDTransition(Transition.SeePlayer, StateID.Chase);
        ChaseState chaseState = new ChaseState(fsm);

        chaseState.ADDTransition(Transition.LostPlayer, StateID.PatroState);
        fsm.AddState(patrolState);
        fsm.AddState(chaseState);
    }