本文整理汇总了C#中OpenSim.Tests.Common.SceneHelpers.GetScenePresences方法的典型用法代码示例。如果您正苦于以下问题:C# SceneHelpers.GetScenePresences方法的具体用法?C# SceneHelpers.GetScenePresences怎么用?C# SceneHelpers.GetScenePresences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Tests.Common.SceneHelpers
的用法示例。
在下文中一共展示了SceneHelpers.GetScenePresences方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestCreateRootScenePresence
public void TestCreateRootScenePresence()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
UUID spUuid = TestHelpers.ParseTail(0x1);
TestScene scene = new SceneHelpers().SetupScene();
SceneHelpers.AddScenePresence(scene, spUuid);
Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null);
Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
ScenePresence sp = scene.GetScenePresence(spUuid);
Assert.That(sp, Is.Not.Null);
Assert.That(sp.IsChildAgent, Is.False);
Assert.That(sp.UUID, Is.EqualTo(spUuid));
Assert.That(scene.GetScenePresences().Count, Is.EqualTo(1));
}
示例2: TestDupeCompleteMovementCalls
public void TestDupeCompleteMovementCalls()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
UUID spUuid = TestHelpers.ParseTail(0x1);
TestScene scene = new SceneHelpers().SetupScene();
int makeRootAgentEvents = 0;
scene.EventManager.OnMakeRootAgent += spi => makeRootAgentEvents++;
ScenePresence sp = SceneHelpers.AddScenePresence(scene, spUuid);
Assert.That(makeRootAgentEvents, Is.EqualTo(1));
// Normally these would be invoked by a CompleteMovement message coming in to the UDP stack. But for
// convenience, here we will invoke it manually.
sp.CompleteMovement(sp.ControllingClient, true);
Assert.That(makeRootAgentEvents, Is.EqualTo(1));
// Check rest of exepcted parameters.
Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null);
Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
Assert.That(sp.IsChildAgent, Is.False);
Assert.That(sp.UUID, Is.EqualTo(spUuid));
Assert.That(scene.GetScenePresences().Count, Is.EqualTo(1));
}