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