本文整理汇总了C#中IScene.AddInterestListHandler方法的典型用法代码示例。如果您正苦于以下问题:C# IScene.AddInterestListHandler方法的具体用法?C# IScene.AddInterestListHandler怎么用?C# IScene.AddInterestListHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScene
的用法示例。
在下文中一共展示了IScene.AddInterestListHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public void Start(IScene scene)
{
m_scene = scene;
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
m_scene.AddInterestListHandler(AVATAR_ANIMATION, new InterestListEventHandler { PriorityCallback = AnimationPrioritizer, SendCallback = SendAvatarAnimationPackets });
m_scene.AddInterestListHandler(VIEWER_EFFECT, new InterestListEventHandler { PriorityCallback = ViewerEffectPrioritizer, SendCallback = SendViewerEffectPackets });
m_udp.AddPacketHandler(PacketType.AgentAnimation, AgentAnimationHandler);
m_udp.AddPacketHandler(PacketType.ViewerEffect, ViewerEffectHandler);
m_scene.OnPresenceAdd += PresenceAddHandler;
m_scene.OnSendPresenceAnimations += SendPresenceAnimationsHandler;
}
}
示例2: Start
public void Start(IScene scene)
{
m_scene = scene;
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
m_scene.AddInterestListHandler(PRELOAD_SOUND, new InterestListEventHandler { SendCallback = SendPreloadSoundsPacket });
}
}
示例3: Start
public void Start(IScene scene)
{
m_scene = scene;
m_userClient = m_scene.Simian.GetAppModule<IUserClient>();
m_inventoryClient = m_scene.Simian.GetAppModule<IInventoryClient>();
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
m_udp.AddPacketHandler(PacketType.AgentSetAppearance, AgentSetAppearanceHandler);
m_udp.AddPacketHandler(PacketType.AgentWearablesRequest, AgentWearablesRequestHandler);
m_udp.AddPacketHandler(PacketType.AgentIsNowWearing, AgentIsNowWearingHandler);
m_udp.AddPacketHandler(PacketType.AgentCachedTexture, AgentCachedTextureHandler);
m_scene.AddInterestListHandler(AVATAR_APPEARANCE, new InterestListEventHandler
{ PriorityCallback = AvatarAppearancePrioritizer, SendCallback = SendAvatarAppearancePackets });
m_scene.OnPresenceAdd += PresenceAddHandler;
}
}
示例4: Start
public void Start(IScene scene)
{
m_scene = scene;
m_terrain = m_scene.GetSceneModule<ITerrain>();
if (m_terrain == null)
{
m_log.Error("LayerData requires an ITerrain module");
return;
}
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
m_udp.AddPacketHandler(PacketType.ModifyLand, ModifyLandHandler);
m_scene.AddInterestListHandler(TERRAIN, new InterestListEventHandler { SendCallback = SendTerrainPacket });
m_scene.OnPresenceAdd += PresenceAddHandler;
m_terrain.OnHeightmapChanged += HeightmapChangedHandler;
m_terrain.OnHeightmapAreaChanged += HeightmapAreaChangedHandler;
}
}
示例5: Start
public void Start(IScene scene)
{
m_scene = scene;
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
// Register for the LLUDP chat packet
m_udp.AddPacketHandler(PacketType.ChatFromViewer, ChatFromViewerHandler);
// Register for the generic scene chat event
m_scene.OnEntityChat += ChatHandler;
// Register for the generic presence alert event
m_scene.OnPresenceAlert += PresenceAlertHandler;
// Add event callbacks for two interest list events that we define: typing and chat
m_scene.AddInterestListHandler(VIEWER_TYPING, new InterestListEventHandler { PriorityCallback = TypingPrioritizer, SendCallback = SendTypingPackets });
m_scene.AddInterestListHandler(VIEWER_CHAT, new InterestListEventHandler { PriorityCallback = ChatPrioritizer, SendCallback = SendChatPackets });
}
}
示例6: Start
public void Start(IScene scene)
{
m_scene = scene;
m_primMesher = m_scene.GetSceneModule<IPrimMesher>();
if (m_primMesher == null)
{
m_log.Error("Objects requires an IPrimMesher");
return;
}
m_permissions = m_scene.GetSceneModule<LLPermissions>();
if (m_permissions == null)
{
m_log.Error("Objects requires LLPermissions");
return;
}
// Optional modules
m_physics = m_scene.GetSceneModule<IPhysicsEngine>();
m_lslScriptEngine = m_scene.GetSceneModule<ILSLScriptEngine>();
m_inventory = m_scene.GetSceneModule<Inventory>();
// Collision handler
if (m_physics != null && m_lslScriptEngine != null)
{
m_physics.OnEntityCollision += EntityCollisionHandler;
}
m_udp = m_scene.GetSceneModule<LLUDP>();
if (m_udp != null)
{
m_udp.AddPacketHandler(PacketType.ObjectAdd, ObjectAddHandler);
m_udp.AddPacketHandler(PacketType.ObjectAttach, ObjectAttachHandler);
m_udp.AddPacketHandler(PacketType.ObjectDrop, ObjectDropHandler);
m_udp.AddPacketHandler(PacketType.ObjectDuplicate, ObjectDuplicateHandler);
m_udp.AddPacketHandler(PacketType.ObjectName, ObjectNameHandler);
m_udp.AddPacketHandler(PacketType.ObjectSelect, ObjectSelectHandler);
m_udp.AddPacketHandler(PacketType.ObjectDeselect, ObjectDeselectHandler);
m_udp.AddPacketHandler(PacketType.ObjectGrab, ObjectGrabHandler);
m_udp.AddPacketHandler(PacketType.ObjectGrabUpdate, ObjectGrabUpdateHandler);
m_udp.AddPacketHandler(PacketType.ObjectDeGrab, ObjectDeGrabHandler);
m_udp.AddPacketHandler(PacketType.ObjectLink, ObjectLinkHandler);
m_udp.AddPacketHandler(PacketType.ObjectDelink, ObjectDelinkHandler);
m_udp.AddPacketHandler(PacketType.ObjectShape, ObjectShapeHandler);
m_udp.AddPacketHandler(PacketType.ObjectFlagUpdate, ObjectFlagUpdateHandler);
m_udp.AddPacketHandler(PacketType.ObjectExtraParams, ObjectExtraParamsHandler);
m_udp.AddPacketHandler(PacketType.ObjectImage, ObjectImageHandler);
m_udp.AddPacketHandler(PacketType.ObjectPermissions, ObjectPermissionsHandler);
m_udp.AddPacketHandler(PacketType.Undo, UndoHandler);
m_udp.AddPacketHandler(PacketType.Redo, RedoHandler);
m_udp.AddPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjectUpdateHandler);
m_udp.AddPacketHandler(PacketType.RequestObjectPropertiesFamily, RequestObjectPropertiesFamilyHandler);
m_scene.AddInterestListHandler(OBJECT_UPDATE, new InterestListEventHandler { CombineCallback = ObjectUpdateCombiner, SendCallback = SendEntityPackets });
m_scene.AddInterestListHandler(OBJECT_REMOVE, new InterestListEventHandler { CombineCallback = ObjectUpdateCombiner, SendCallback = SendKillPacket });
m_scene.OnEntityAddOrUpdate += EntityAddOrUpdateHandler;
m_scene.OnEntityRemove += EntityRemoveHandler;
m_scene.OnPresenceAdd += PresenceAddHandler;
}
m_proxyPrim = new Primitive();
m_proxyPrim.PrimData = ObjectManager.BuildBasicShape(PrimType.Box);
}