Esempio n. 1
0
        private void MakeFSM()
        {
            mFSMSystem = new BotanyFSMSytem();

            BotanyIdleState idleState = new BotanyIdleState(mFSMSystem, this);

            idleState.AddTransition(BotanyTransition.SeeEnemy, BotanyStateID.Attack);

            BotanyAttackState attackState = new BotanyAttackState(mFSMSystem, this);

            attackState.AddTransition(BotanyTransition.NoEnmey, BotanyStateID.Idle);

            mFSMSystem.AddState(idleState, attackState);
        }
Esempio n. 2
0
 public IBotanyState(BotanyFSMSytem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }
Esempio n. 3
0
 public BotanyAttackState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID     = BotanyStateID.Attack;
     mAttackTimer = mAttackTime;
 }
Esempio n. 4
0
 public BotanyIdleState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID = BotanyStateID.Idle;
 }