本文整理汇总了C#中Region.GetMobiles方法的典型用法代码示例。如果您正苦于以下问题:C# Region.GetMobiles方法的具体用法?C# Region.GetMobiles怎么用?C# Region.GetMobiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region.GetMobiles方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GETREGIONMOBS
public static ArrayList GETREGIONMOBS(TriggerObject trigObject, Region region)
{
return region != null ? new ArrayList(region.GetMobiles()) : new ArrayList();
}
示例2: EJECTREGIONPLAYERS
public static void EJECTREGIONPLAYERS(TriggerObject trigObject, Region region)
{
var mobs = region.GetMobiles();
ArrayList murdererRectangles = new ArrayList(MurdererEjectionRectangles);
ArrayList normalRectangles = new ArrayList(EjectionRectangles);
foreach (Mobile m in mobs)
{
if (m.Player)
{
if (m.Kills < 5)
{
if (!MOVETOSPAWNLOCATION(trigObject, m, Map.Felucca, normalRectangles))
{
m.MoveToWorld(new Point3D(2667, 2108, 0), Map.Felucca); // bucs, shouldn't ever get here really
}
}
else
{
if (!MOVETOSPAWNLOCATION(trigObject, m, Map.Felucca, murdererRectangles))
{
m.MoveToWorld(new Point3D(2667, 2108, 0), Map.Felucca); // bucs, shouldn't ever get here really
}
}
}
else if (m is BaseCreature)
{
BaseCreature bc = (BaseCreature)m;
if (bc.ControlMaster != null && bc.ControlMaster.Player && bc.ControlMaster.Map == Map.Felucca)
{
bc.MoveToWorld(bc.ControlMaster.Location, bc.ControlMaster.Map);
}
}
}
// now boot out any logged out mobs in the region
foreach (Mobile m in
World.Mobiles.Values.Where(
m =>
!m.Deleted && m.Player && m.Map == Map.Internal && m.LogoutMap == region.Map && region.Contains(m.LogoutLocation))
)
{
m.LogoutMap = Map.Felucca;
// brit bank : buc's den
m.LogoutLocation = m.Kills < 5 ? new Point3D(1438, 1690, 0) : new Point3D(2722, 2184, 0);
}
}
示例3: GetMobilesTest
public void GetMobilesTest()
{
XmlElement xml = null; // TODO: 初始化为适当的值
BaseMap map = null; // TODO: 初始化为适当的值
Region parent = null; // TODO: 初始化为适当的值
Region target = new Region( xml, map, parent ); // TODO: 初始化为适当的值
List<BaseCreature> expected = null; // TODO: 初始化为适当的值
List<BaseCreature> actual;
actual = target.GetMobiles();
Assert.AreEqual( expected, actual );
Assert.Inconclusive( "验证此测试方法的正确性。" );
}