當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。