示例#1
0
文件: IBotany.cs 项目: githjub/Study
        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);
        }
示例#2
0
 public IBotanyState(BotanyFSMSytem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }
示例#3
0
 public BotanyAttackState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID     = BotanyStateID.Attack;
     mAttackTimer = mAttackTime;
 }
示例#4
0
 public BotanyIdleState(BotanyFSMSytem fsm, ICharacter c) : base(fsm, c)
 {
     mStateID = BotanyStateID.Idle;
 }