本文整理汇总了C#中IClientAPI.SendKillObject方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendKillObject方法的具体用法?C# IClientAPI.SendKillObject怎么用?C# IClientAPI.SendKillObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendKillObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SelectPrim
/// <summary>
/// Invoked when the client selects a prim.
/// </summary>
/// <param name="primLocalIDs"></param>
/// <param name="remoteClient"></param>
protected void SelectPrim(List<uint> primLocalIDs, IClientAPI remoteClient)
{
IScene scene = remoteClient.Scene;
List<ISceneChildEntity> EntitiesToUpdate = new List<ISceneChildEntity>();
ISceneChildEntity prim = null;
foreach (uint primLocalID in primLocalIDs)
{
ISceneChildEntity entity = null;
if (scene.SceneGraph.TryGetPart(primLocalID, out entity))
{
if (entity is ISceneChildEntity)
{
prim = entity;
// changed so that we send select to all the indicated prims
// also to root prim (done in prim.IsSelected)
// so "edit link parts" keep the object select and not moved by physics
// similar changes on deselect
// part.IsSelect is on SceneObjectPart.cs
// Ubit
prim.ParentEntity.IsSelected = true;
}
}
//Check for avatars! They aren't prims!
if (scene.GetScenePresence(primLocalID) != null)
continue;
if (entity != null)
{
if (!EntitiesToUpdate.Contains(entity))
EntitiesToUpdate.Add(entity);
}
else
{
MainConsole.Instance.ErrorFormat(
"[SCENEPACKETHANDLER]: Could not find prim {0} in SelectPrim, killing prim.",
primLocalID);
//Send a kill packet to the viewer so it doesn't come up again
remoteClient.SendKillObject(scene.RegionInfo.RegionHandle, new uint[1] {primLocalID});
}
}
IScenePresence SP;
scene.TryGetScenePresence(remoteClient.AgentId, out SP);
if (SP == null)
return;
if (EntitiesToUpdate.Count != 0)
{
SP.SceneViewer.QueuePartsForPropertiesUpdate(EntitiesToUpdate.ToArray());
}
PerClientSelectionParticles selection = SP.RequestModuleInterface<PerClientSelectionParticles>();
if (selection != null)
{
selection.SelectedUUID = prim;
selection.IsSelecting = true;
}
}
示例2: SelectPrim
/// <summary>
/// Invoked when the client selects a prim.
/// </summary>
/// <param name="primLocalID"></param>
/// <param name="remoteClient"></param>
protected void SelectPrim(List<uint> primLocalIDs, IClientAPI remoteClient)
{
Scene scene = ((Scene)remoteClient.Scene);
List<IEntity> EntitiesToUpdate = new List<IEntity> ();
SceneObjectPart prim = null;
foreach (uint primLocalID in primLocalIDs)
{
ISceneChildEntity entity = null;
if (scene.SceneGraph.TryGetPart(primLocalID, out entity))
{
if (entity is SceneObjectPart)
{
prim = entity as SceneObjectPart;
// changed so that we send select to all the indicated prims
// also to root prim (done in prim.IsSelected)
// so "edit link parts" keep the object select and not moved by physics
// similar changes on deselect
// part.IsSelect is on SceneObjectPart.cs
// Ubit
// if (prim.IsRoot)
{
// prim.ParentGroup.IsSelected = true;
prim.IsSelected = true;
scene.AuroraEventManager.FireGenericEventHandler("ObjectSelected", prim);
}
}
}
//Check for avies! They arn't prims!
if (scene.GetScenePresence(primLocalID) != null)
{
continue;
}
if (entity != null)
EntitiesToUpdate.Add(entity);
else
{
m_log.Error("[SCENEPACKETHANDLER]: Could not find prim in SelectPrim, killing prim.");
//Send a kill packet to the viewer so it doesn't come up again
remoteClient.SendKillObject(scene.RegionInfo.RegionHandle, new uint[1] { primLocalID });
}
}
if (EntitiesToUpdate.Count != 0)
remoteClient.SendObjectPropertiesReply(EntitiesToUpdate);
IScenePresence SP;
scene.TryGetScenePresence(remoteClient.AgentId, out SP);
PerClientSelectionParticles selection = SP.RequestModuleInterface<PerClientSelectionParticles>();
if (selection != null)
{
selection.SelectedUUID = prim;
selection.IsSelecting = true;
}
}
示例3: OnGrabGroup
public override void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
{
if (m_parts.Count == 1)
{
m_parts.Remove(m_rootPart.UUID);
m_scene.DeleteSceneObject(this, false);
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
remoteClient.AddMoney(50);
remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}
}
示例4: Hide
/// <summary>
/// Hides the metaentity from a single client.
/// </summary>
public virtual void Hide(IClientAPI client)
{
//This deletes the group without removing from any databases.
//This is important because we are not IN any database.
//m_Entity.FakeDeleteGroup();
foreach (SceneObjectPart part in m_Entity.Children.Values)
client.SendKillObject(m_Entity.RegionHandle, part.LocalId);
}
示例5: OnGrabPart
public override void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
{
m_parts.Remove(part.UUID);
remoteClient.SendKillObject(m_regionHandle, part.LocalId);
remoteClient.AddMoney(1);
remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}