本文整理汇总了C#中Saga.PrimaryTypes.Character.ShowObject方法的典型用法代码示例。如果您正苦于以下问题:C# Character.ShowObject方法的具体用法?C# Character.ShowObject怎么用?C# Character.ShowObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Saga.PrimaryTypes.Character
的用法示例。
在下文中一共展示了Character.ShowObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Warp
//.........这里部分代码省略.........
c.Disappear(target);
}
}
#endregion Notify People That Actor Disapears
#region Update Region
target.Position = new Point(destination.x, destination.y, destination.z);
Regiontree.UpdateRegion(target);
#endregion Update Region
#region Teleport
SMSG_ACTORTELEPORT spkt = new SMSG_ACTORTELEPORT();
spkt.SessionId = target.id;
spkt.x = destination.x;
spkt.y = destination.y;
spkt.Z = destination.z;
target.client.Send((byte[])spkt);
#endregion Teleport
#region Reset State
target.ISONBATTLE = false;
target.stance = (byte)StancePosition.Reborn;
target._targetid = 0;
SMSG_ACTORCHANGESTATE spkt4 = new SMSG_ACTORCHANGESTATE();
spkt4.SessionId = target.id;
spkt4.Stance = target.stance;
spkt4.TargetActor = target._targetid;
spkt4.State = (target.ISONBATTLE == true) ? (byte)1 : (byte)0;
spkt4.ActorID = target.id;
target.client.Send((byte[])spkt4);
#endregion Reset State
#region Notify People That the Actor Appears
tree = target.currentzone.Regiontree;
foreach (MapObject myObject in tree.SearchActors(target, SearchFlags.DynamicObjects))
{
bool insightrangeold = Point.IsInSightRangeByRadius(origin, myObject.Position);
bool insightrangenew = Point.IsInSightRangeByRadius(destination, myObject.Position);
double distance = Point.GetDistance3D(destination, myObject.Position);
//If visible from new postion but not from old postion
if (insightrangenew && !insightrangeold)
{
myObject.ShowObject(target);
myObject.Appears(target);
if (MapObject.IsPlayer(myObject))
{
Character current = (Character)myObject;
if (current.client.isloaded == false) continue;
target.ShowObject(current);
}
}
}
#endregion Notify People That the Actor Appears
#region Notify Party Members
if (target.sessionParty != null)
{
foreach (Character partyTarget in target.sessionParty)
{
if (partyTarget.id == target.id) continue;
SMSG_PARTYMEMBERLOCATION spkt3 = new SMSG_PARTYMEMBERLOCATION();
spkt3.Index = 1;
spkt3.ActorId = target.id;
spkt3.SessionId = partyTarget.id;
spkt3.X = (destination.x / 1000);
spkt3.Y = (destination.y / 1000);
partyTarget.client.Send((byte[])spkt3);
}
}
#endregion Notify Party Members
return true;
}
}
else
{
Trace.TraceError("Warping player {0} to unsupported map {1}", target.Name, 0);
return false;
}
}
else
{
return false;
}
}