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


C# SceneHelpers.GetScenePresences方法代码示例

本文整理汇总了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));
        }
开发者ID:rryk,项目名称:omp-server,代码行数:20,代码来源:ScenePresenceAgentTests.cs

示例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));
        }
开发者ID:ffoliveira,项目名称:opensimulator,代码行数:31,代码来源:ScenePresenceAgentTests.cs


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