当前位置: 首页>>代码示例>>C#>>正文


C# OpenMetaverse.Avatar类代码示例

本文整理汇总了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);
                        }
                    }
                }
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:35,代码来源:TexturesCommand.cs

示例2: OutfitTextures

        public OutfitTextures(RadegastInstance instance, Avatar avatar)
        {
            InitializeComponent();

            this.instance = instance;
            this.avatar = avatar;
        }
开发者ID:Nuriat,项目名称:radegast,代码行数:7,代码来源:OutfitTextures.cs

示例3: OutfitTextures

        public OutfitTextures(RadegastInstance instance, Avatar avatar)
        {
            InitializeComponent();

            this.instance = instance;
            this.avatar = avatar;

            Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
        }
开发者ID:nooperation,项目名称:radegast,代码行数:9,代码来源:OutfitTextures.cs

示例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;
 }
开发者ID:niel,项目名称:radegast,代码行数:9,代码来源:AnimDetail.cs

示例5: AttachmentTab

        public AttachmentTab(RadegastInstance instance, Avatar iav)
        {
            this.instance = instance;
            av = iav;
            InitializeComponent();
            AutoScrollPosition = new Point(0, 0);

            InitializeComponent();
        }
开发者ID:Booser,项目名称:radegast,代码行数:9,代码来源:AttachmentTab.cs

示例6: Avatars_OnAvatarProperties

        void Avatars_OnAvatarProperties(UUID avatarID, Avatar.AvatarProperties properties)
        {
            lock (ReceivedProfileEvent)
            {
                Properties = properties;
                ReceivedProperties = true;

                if (ReceivedInterests && ReceivedProperties && ReceivedGroups)
                    ReceivedProfileEvent.Set();
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:11,代码来源:CloneProfileCommand.cs

示例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);
        }
开发者ID:Booser,项目名称:radegast,代码行数:11,代码来源:AnimTab.cs

示例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);
        }
开发者ID:nooperation,项目名称:radegast,代码行数:11,代码来源:AnimDetail.cs

示例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);
        }
开发者ID:NullProjects,项目名称:METAbolt,代码行数:14,代码来源:WornAttachments.cs

示例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);
        }
开发者ID:Booser,项目名称:radegast,代码行数:18,代码来源:MasterTab.cs

示例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);
        }
开发者ID:BillBarnhill,项目名称:Radegast-Viewer,代码行数:19,代码来源:AttachmentDetail.cs

示例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);
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:39,代码来源:SceneManager.cs

示例13: AvatarPropertiesReplyEventArgs

 public AvatarPropertiesReplyEventArgs(UUID avatarID, Avatar.AvatarProperties properties)
 {
     this.m_AvatarID = avatarID;
     this.m_Properties = properties;
 }
开发者ID:CCIR,项目名称:libopenmetaverse,代码行数:5,代码来源:AvatarManager.cs

示例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;
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:7,代码来源:ObjectManager.cs

示例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;
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:14,代码来源:ObjectManager.cs


注:本文中的OpenMetaverse.Avatar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。