当前位置: 首页>>代码示例>>C#>>正文


C# Zone.ObjInZone方法代码示例

本文整理汇总了C#中Zone.ObjInZone方法的典型用法代码示例。如果您正苦于以下问题:C# Zone.ObjInZone方法的具体用法?C# Zone.ObjInZone怎么用?C# Zone.ObjInZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zone的用法示例。


在下文中一共展示了Zone.ObjInZone方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: mobsCountInZone

 private int mobsCountInZone(Zone zone, uint[] ids)
 { 
     int result = 0;
     foreach (var m in host.getCreatures())
     {
         if (ids.Contains(m.creatureId) && zone.ObjInZone(m))
             result++;
     }
     return result;
 }
开发者ID:eysho,项目名称:ProjektAA,代码行数:10,代码来源:Quest_2048.cs

示例2: GetBestNearestMob

 //Try to find best mob in farm zone.
 public Creature GetBestNearestMob(Zone zone)
 {
     Creature mob = null;
     double dist = 999999;
     foreach (var obj in getCreatures())
     {      
         //If creature Npc and we can attack him and creature alive and distance to this creature less than other and creature have 100% hp or creature want to kill out character.
         if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me) && isAlive(obj) && me.dist(obj) < dist && zone.ObjInZone(obj)
             && (hpp(obj) == 100 || obj.aggroTarget == me))
         {
             mob = obj;
             dist = me.dist(obj);
         }
     }
     return mob;
 }
开发者ID:BKGDeveloper,项目名称:ProjektAA,代码行数:17,代码来源:bKg-sorcery-grind.cs

示例3: getNearestMob

        private Creature getNearestMob(Zone zone)
        {
            double minDist = 999999;
            Creature bestCreature = null;
            foreach (var creature in host.getCreatures())
            {
                if (creature.creatureId == 3364 && host.isAlive(creature) && zone.ObjInZone(creature))
                {
                    if (minDist > host.me.dist(creature))
                    {
                        minDist = host.me.dist(creature);
                        bestCreature = creature;
                    }
                }

            }
            return bestCreature;
        }
开发者ID:eysho,项目名称:ProjektAA,代码行数:18,代码来源:Quest_1102.cs

示例4: GetNearestCreaturesInZoneById

        internal Creature GetNearestCreaturesInZoneById(Zone zone, List<uint> creatureId)
        {
            try
            {
                Creature creature = null;
                var tempCreatures = host.getCreatures();
                double minDist = 999999;
                for (int i = 0; i < tempCreatures.Count; i++)
                {
                    if (creatureId.Exists(c => c == tempCreatures[i].creatureId) && host.dist(tempCreatures[i]) < minDist && zone.ObjInZone(tempCreatures[i]))
                    {
                        minDist = host.dist(tempCreatures[i]);
                        creature = tempCreatures[i];
                    }
                }
                return creature;
            }
            catch (Exception error)
            {

            }
            return null;
        }
开发者ID:eysho,项目名称:ProjektAA,代码行数:23,代码来源:FarmModule.cs

示例5: getDoodadsCountInZone

 public int getDoodadsCountInZone(Zone zone, uint phaseId)
 {
     int result = 0;
     foreach (var doodad in host.getDoodads())
     {
         if (doodad.phaseId == phaseId && zone.ObjInZone(doodad))
             result++;
     }
     return result;
 }
开发者ID:eysho,项目名称:ProjektAA,代码行数:10,代码来源:FarmModule.cs


注:本文中的Zone.ObjInZone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。