本文整理汇总了C#中OpenMetaverse.Avatar类的典型用法代码示例。如果您正苦于以下问题:C# Avatar类的具体用法?C# Avatar怎么用?C# Avatar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Avatar类属于OpenMetaverse命名空间,在下文中一共展示了Avatar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Objects_OnNewAvatar
void Objects_OnNewAvatar(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation)
{
if (enabled)
{
// Search this avatar for textures
for (int i = 0; i < avatar.Textures.FaceTextures.Length; i++)
{
Primitive.TextureEntryFace face = avatar.Textures.FaceTextures[i];
if (face != null)
{
if (!alreadyRequested.ContainsKey(face.TextureID))
{
alreadyRequested[face.TextureID] = face.TextureID;
// Determine if this is a baked outfit texture or a normal texture
ImageType type = ImageType.Normal;
AppearanceManager.TextureIndex index = (AppearanceManager.TextureIndex)i;
switch (index)
{
case AppearanceManager.TextureIndex.EyesBaked:
case AppearanceManager.TextureIndex.HeadBaked:
case AppearanceManager.TextureIndex.LowerBaked:
case AppearanceManager.TextureIndex.SkirtBaked:
case AppearanceManager.TextureIndex.UpperBaked:
type = ImageType.Baked;
break;
}
Client.Assets.RequestImage(face.TextureID, type);
}
}
}
}
}
示例2: OutfitTextures
public OutfitTextures(RadegastInstance instance, Avatar avatar)
{
InitializeComponent();
this.instance = instance;
this.avatar = avatar;
}
示例3: OutfitTextures
public OutfitTextures(RadegastInstance instance, Avatar avatar)
{
InitializeComponent();
this.instance = instance;
this.avatar = avatar;
Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
}
示例4: AnimDetail
public AnimDetail(RadegastInstance instance, Avatar av, UUID anim, int n)
{
InitializeComponent();
Disposed += new EventHandler(AnimDetail_Disposed);
this.instance = instance;
this.av = av;
this.anim = anim;
this.n = n;
}
示例5: AttachmentTab
public AttachmentTab(RadegastInstance instance, Avatar iav)
{
this.instance = instance;
av = iav;
InitializeComponent();
AutoScrollPosition = new Point(0, 0);
InitializeComponent();
}
示例6: Avatars_OnAvatarProperties
void Avatars_OnAvatarProperties(UUID avatarID, Avatar.AvatarProperties properties)
{
lock (ReceivedProfileEvent)
{
Properties = properties;
ReceivedProperties = true;
if (ReceivedInterests && ReceivedProperties && ReceivedGroups)
ReceivedProfileEvent.Set();
}
}
示例7: AnimTab
public AnimTab(RadegastInstance instance, Avatar av)
{
InitializeComponent();
Disposed += new EventHandler(AnimTab_Disposed);
this.instance = instance;
this.av = av;
this.client = instance.Client;
// Callbacks
client.Avatars.AvatarAnimation += new EventHandler<AvatarAnimationEventArgs>(Avatars_AvatarAnimation);
}
示例8: AnimDetail
public AnimDetail(RadegastInstance instance, Avatar av, UUID anim, int n)
{
InitializeComponent();
Disposed += new EventHandler(AnimDetail_Disposed);
this.instance = instance;
this.av = av;
this.anim = anim;
this.n = n;
Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
}
示例9: WornAttachments
//private Dictionary<uint, AttachmentsListItem> groupItems = new Dictionary<uint, AttachmentsListItem>();
public WornAttachments(METAboltInstance instance, Avatar av)
{
InitializeComponent();
Disposed += new EventHandler(WornAttachments_Disposed);
this.instance = instance;
client = this.instance.Client;
this.av = av;
client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(SIM_OnSimChanged);
//client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress);
}
示例10: MasterTab
public MasterTab(RadegastInstance instance, Avatar avatar)
{
InitializeComponent();
Disposed += new EventHandler(MasterTab_Disposed);
if (!instance.advancedDebugging)
{
saveBtn.Visible = false;
texturesBtn.Visible = false;
}
this.instance = instance;
this.avatar = avatar;
// Callbacks
client.Avatars.ViewerEffectPointAt += new EventHandler<ViewerEffectPointAtEventArgs>(Avatars_ViewerEffectPointAt);
client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties);
}
示例11: AttachmentDetail
public AttachmentDetail(RadegastInstance instance, Avatar av, Primitive attachment)
{
InitializeComponent();
Disposed += new EventHandler(AttachmentDetail_Disposed);
this.instance = instance;
this.av = av;
this.attachment = attachment;
if (!instance.advancedDebugging)
{
btnSave.Visible = false;
boxID.Visible = false;
lblAttachment.Visible = false;
}
// Callbacks
client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties);
}
示例12: CompleteAgentMovementHandler
void CompleteAgentMovementHandler(Packet packet, Agent agent)
{
CompleteAgentMovementPacket request = (CompleteAgentMovementPacket)packet;
// Create a representation for this agent
Avatar avatar = new Avatar();
avatar.ID = agent.AgentID;
avatar.LocalID = (uint)Interlocked.Increment(ref currentLocalID);
avatar.Position = new Vector3(128f, 128f, 25f);
avatar.Rotation = Quaternion.Identity;
avatar.Scale = new Vector3(1f, 1f, 3f);
// Set the avatar name
NameValue[] name = new NameValue[2];
name[0] = new NameValue("FirstName", NameValue.ValueType.String, NameValue.ClassType.ReadWrite,
NameValue.SendtoType.SimViewer, agent.FirstName);
name[1] = new NameValue("LastName", NameValue.ValueType.String, NameValue.ClassType.ReadWrite,
NameValue.SendtoType.SimViewer, agent.LastName);
avatar.NameValues = name;
// Link this avatar up with the corresponding agent
agent.Avatar = avatar;
// Give testers a provisionary balance of 1000L
agent.Balance = 1000;
AgentMovementCompletePacket complete = new AgentMovementCompletePacket();
complete.AgentData.AgentID = agent.AgentID;
complete.AgentData.SessionID = agent.SessionID;
complete.Data.LookAt = Vector3.UnitX;
complete.Data.Position = avatar.Position;
complete.Data.RegionHandle = server.RegionHandle;
complete.Data.Timestamp = Utils.DateTimeToUnixTime(DateTime.Now);
complete.SimData.ChannelVersion = Utils.StringToBytes("Simian");
agent.SendPacket(complete);
SendLayerData(agent);
}
示例13: AvatarPropertiesReplyEventArgs
public AvatarPropertiesReplyEventArgs(UUID avatarID, Avatar.AvatarProperties properties)
{
this.m_AvatarID = avatarID;
this.m_Properties = properties;
}
示例14: AvatarSitChangedEventArgs
public AvatarSitChangedEventArgs(Simulator simulator, Avatar avatar, uint sittingOn, uint oldSeat)
{
this.m_Simulator = simulator;
this.m_Avatar = avatar;
this.m_SittingOn = sittingOn;
this.m_OldSeat = oldSeat;
}
示例15: AvatarUpdateEventArgs
/// <summary>
/// Construct a new instance of the AvatarUpdateEventArgs class
/// </summary>
/// <param name="simulator">The simulator the packet originated from</param>
/// <param name="avatar">The <see cref="Avatar"/> data</param>
/// <param name="timeDilation">The simulator time dilation</param>
/// <param name="isNew">The avatar was not in the dictionary before this update</param>
public AvatarUpdateEventArgs(Simulator simulator, Avatar avatar, ushort timeDilation, bool isNew)
{
this.m_Simulator = simulator;
this.m_Avatar = avatar;
this.m_TimeDilation = timeDilation;
this.m_IsNew = isNew;
}