Example #1
0
        public override bool SelectTarget(NPCInstance npc)
        {
            if (!base.SelectTarget(npc))
            {
                return(false);
            }

            RoleActor target = npc.GetTarget(npc.mAttackTarget);

            return(npc.FollowTarget(target));
        }
Example #2
0
        public override bool OnFollowTarget(NPCInstance npc)
        {
            if (npc.CanCastSpell())
            {
                //到释放技能距离
                npc.ChangeState(eNPCState.WaitCoolDown);
            }
            else
            {
                if (npc.IsMoving)
                {
                    return(false);
                }

                if (!npc.FollowTarget(npc.GetTarget(npc.mAttackTarget)))
                {
                    npc.ReturnSpawnPoint();
                    return(false);
                }
            }

            return(true);
        }