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); }
public IEnemyState(EnemyFSMSystem fsm, ICharacter character) { mFSM = fsm; mCharacter = character; }
public EnemyChaseState(EnemyFSMSystem fsm, ICharacter c) : base(fsm, c) { mStateID = EnemyStateID.Chase; }
public EnemyAttackState(EnemyFSMSystem fsm, ICharacter c) : base(fsm, c) { mStateID = EnemyStateID.Attack; mAttackTimer = mAttackTime; }