示例#1
0
    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);
    }
示例#2
0
 public HugeFireMonsterChaseState(HugeFireMonsterFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID = HugeFireMonsterStateID.Chase;
 }
示例#3
0
 public HugeFireMonsterAttackState(HugeFireMonsterFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID = HugeFireMonsterStateID.Attack;
 }
示例#4
0
 public IHugeFireMonsterState(HugeFireMonsterFSMSystem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }