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); }
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); }
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); }