Example #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);
        }
Example #2
0
 public IBotanyState(BotanyFSMSytem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }
Example #3
0
 public BotanyAttackState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID     = BotanyStateID.Attack;
     mAttackTimer = mAttackTime;
 }
Example #4
0
 public BotanyIdleState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID = BotanyStateID.Idle;
 }