本文整理汇总了C#中OpenSim.Tests.Common.SceneHelpers.GetChildAgentCount方法的典型用法代码示例。如果您正苦于以下问题:C# SceneHelpers.GetChildAgentCount方法的具体用法?C# SceneHelpers.GetChildAgentCount怎么用?C# SceneHelpers.GetChildAgentCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Tests.Common.SceneHelpers
的用法示例。
在下文中一共展示了SceneHelpers.GetChildAgentCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSameRegion
public void TestSameRegion()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
EntityTransferModule etm = new EntityTransferModule();
IConfigSource config = new IniConfigSource();
config.AddConfig("Modules");
// Not strictly necessary since FriendsModule assumes it is the default (!)
config.Configs["Modules"].Set("EntityTransferModule", etm.Name);
TestScene scene = new SceneHelpers().SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000);
SceneHelpers.SetupSceneModules(scene, config, etm);
Vector3 teleportPosition = new Vector3(10, 11, 12);
Vector3 teleportLookAt = new Vector3(20, 21, 22);
ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
sp.AbsolutePosition = new Vector3(30, 31, 32);
scene.RequestTeleportLocation(
sp.ControllingClient,
scene.RegionInfo.RegionHandle,
teleportPosition,
teleportLookAt,
(uint)TeleportFlags.ViaLocation);
Assert.That(sp.AbsolutePosition, Is.EqualTo(teleportPosition));
Assert.That(scene.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(scene.GetChildAgentCount(), Is.EqualTo(0));
// Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
// position instead).
// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
}