示例#1
0
    private void MakeFSM()
    {
        mFSMSystem = new EnemyFSMSystem();
        EnemyChaseState chaseState = new EnemyChaseState(mFSMSystem, this);

        chaseState.AddTransition(EnemyTransition.CanAttack, EnemyStateID.Attack);
        EnemyAttackState attackState = new EnemyAttackState(mFSMSystem, this);

        attackState.AddTransition(EnemyTransition.LostSoldier, EnemyStateID.Chase);
        mFSMSystem.AddState(chaseState, attackState);
    }
示例#2
0
    protected virtual void MakeFSM()
    {
        fsmSystem = new EnemySatateSystem();

        EnemyChaseState chase = new EnemyChaseState(fsmSystem, this);

        chase.AddTransition(EnemyTransition.CanAttack, EnemyStateID.Attack);
        fsmSystem.AddState(chase);

        EnemyAttackState attack = new EnemyAttackState(fsmSystem, this);

        attack.AddTransition(EnemyTransition.LostSoldier, EnemyStateID.Chase);
        fsmSystem.AddState(attack);
    }
示例#3
0
    private void MakeFsm()
    {
        Fsm = new EnemyFSMSystem();

        EnemyChaseState chase = new EnemyChaseState(Fsm, this);

        chase.AddTransition(EnemyTransition.CanAttack, EnemyStateID.Attack);

        EnemyAttackState attack = new EnemyAttackState(Fsm, this);

        attack.AddTransition(EnemyTransition.LostSoldier, EnemyStateID.Chase);

        Fsm.AddState(chase, attack);
    }