Beispiel #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);
    }
Beispiel #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);
    }
Beispiel #3
0
    public override void MakeFSM()
    {
        EnemyPatrolState patrol = new EnemyPatrolState();

        patrol.AddTransition(EntityTransition.TargetSpotted, EntityStateID.Chase);

        EnemyChaseState chase = new EnemyChaseState();

        chase.AddTransition(EntityTransition.LostTarget, EntityStateID.Patrol);

        fsm = new EntityFSMSystem();
        fsm.AddState(patrol);
        fsm.AddState(chase);
    }
    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);
    }