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


C# Region.Contains方法代码示例

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


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

示例1: 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);
				}
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:48,代码来源:UberScriptFunctions.cs

示例2: ContainsTest

 public void ContainsTest()
 {
     XmlElement xml = null; // TODO: 初始化为适当的值
     BaseMap map = null; // TODO: 初始化为适当的值
     Region parent = null; // TODO: 初始化为适当的值
     Region target = new Region( xml, map, parent ); // TODO: 初始化为适当的值
     Point3D point3D = new Point3D(); // TODO: 初始化为适当的值
     bool expected = false; // TODO: 初始化为适当的值
     bool actual;
     actual = target.Contains( point3D );
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:13,代码来源:RegionTest.cs

示例3: REGIONCONTAINS

			public static bool REGIONCONTAINS(TriggerObject trigObject, Region region, IPoint3D location)
			{
				return region != null && location != null && region.Contains(new Point3D(location));
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:UberScriptFunctions.cs

示例4: ClearBuildingsInRegion

	/// <summary>
	/// Clears the buildings in region.
	/// </summary>
	/// <param name='region'>
	/// Region in world space.
	/// </param>
	private void ClearBuildingsInRegion(Region region)
	{
		Vector3 p;
		GameObject[] instances = m_buildingInstances.ToArray();
		foreach (GameObject go in instances) {
			p = go.transform.position;
			if (!region.Contains(p)) {
				continue;
			}
			m_buildingInstances.Remove(go);
			Destroy(go);
		}
	}
开发者ID:wids-eria,项目名称:tf_client,代码行数:19,代码来源:TerrainManager.cs


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