private void MakeFSM() { mFSMSystem = new HugeFireMonsterFSMSystem(); HugeFireMonsterChaseState chaseState = new HugeFireMonsterChaseState(mFSMSystem, this); chaseState.AddTransition(HugeFireMonsterTransition.CanAttack, HugeFireMonsterStateID.Attack); HugeFireMonsterAttackState attackState = new HugeFireMonsterAttackState(mFSMSystem, this); attackState.AddTransition(HugeFireMonsterTransition.Attacked, HugeFireMonsterStateID.Leave); attackState.AddTransition(HugeFireMonsterTransition.SeaEnemy, HugeFireMonsterStateID.Chase); HugeFireMonsterLeaveState leaveState = new HugeFireMonsterLeaveState(mFSMSystem, this); leaveState.AddTransition(HugeFireMonsterTransition.SeaEnemy, HugeFireMonsterStateID.Chase); mFSMSystem.AddState(chaseState, attackState, leaveState); }
public HugeFireMonsterChaseState(HugeFireMonsterFSMSystem fsm, ICharacter character) : base(fsm, character) { mStateID = HugeFireMonsterStateID.Chase; }
public HugeFireMonsterAttackState(HugeFireMonsterFSMSystem fsm, ICharacter character) : base(fsm, character) { mStateID = HugeFireMonsterStateID.Attack; }
public IHugeFireMonsterState(HugeFireMonsterFSMSystem fsm, ICharacter character) { mFSM = fsm; mCharacter = character; }