示例#1
0
    void Start()
    {
        Fsm = new FSMSystem();
        ChaseState Chase = new ChaseState(Fsm);

        Chase.AddTransition(Transition.AttackPlayer, StateID.Attack);
        Fsm.AddStateID(Chase);
        AttackState Attack = new AttackState(Fsm);

        Attack.AddTransition(Transition.NoChasePlayer, StateID.Chase);
        Fsm.AddStateID(Attack);
    }