コード例 #1
0
        private void MakeFSM()
        {
            mFSMSystem = new EnemyFSMSystem();

            EnemyStateChase enemyStateChase = new EnemyStateChase(mFSMSystem, this);

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


            EnemyStateAttack enemyStateAttack = new EnemyStateAttack(mFSMSystem, this);

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

            mFSMSystem.AddState(enemyStateAttack, enemyStateChase);
        }
コード例 #2
0
 public EnemyStateChase(EnemyFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID = EnemyStateID.Chase;
 }
コード例 #3
0
 public IEnemyState(EnemyFSMSystem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }
コード例 #4
0
 public EnemyStateAttack(EnemyFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID     = EnemyStateID.Attack;
     mAttackTimer = mAttackTime;
 }