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); }