Пример #1
0
 ///<summary>Raises the AvatarAppearance Event</summary>
 /// <param name="e">A AvatarAppearanceEventArgs object containing
 /// the data sent from the simulator</param>
 protected virtual void OnAvatarAppearance(AvatarAppearanceEventArgs e)
 {
     EventHandler<AvatarAppearanceEventArgs> handler = m_AvatarAppearance;
     if (handler != null)
         handler(this, e);
 }
Пример #2
0
 void Avatars_OnAvatarAppearance(object sender, AvatarAppearanceEventArgs e)
 {
     if (e.VisualParams.Count > 31)
     {
         lock (_TrackedAvatars)
         {
             TrackedAvatar trackedAvatar;
             if (_TrackedAvatars.TryGetValue(e.AvatarID, out trackedAvatar))
             {                        
                 this.BeginInvoke((MethodInvoker)delegate
                 {
                     byte param = e.VisualParams[31];
                     if (param > 0)
                         trackedAvatar.ListViewItem.ForeColor = Color.Blue;
                     else
                         trackedAvatar.ListViewItem.ForeColor = Color.Magenta;
                 });                        
             }
         }
     }
 }
Пример #3
0
        void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e)
        {
            if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) return;

            Avatar a = e.Simulator.ObjectsAvatars.Find(av => av.ID == e.AvatarID);
            if (a != null)
            {
                AddAvatarToScene(a);
            }
        }
Пример #4
0
 void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e)
 {
     // We don't currently have UUID -> RenderAvatar mapping so we need to walk the list
     foreach (RenderAvatar av in Avatars.Values)
     {
         if (av.avatar.ID == e.AvatarID)
         {
             av.glavatar.morph(av.avatar);
         }
     }
 }
Пример #5
0
        //public override void Objects_OnNewAttachment(Simulator simulator, Primitive prim, ulong regionHandle,
        //                                             ushort timeDilation)
        //{
        //    if (!IsMaster(simulator)) return;
        //    if (ScriptHolder == null && prim.ParentID != 0 && prim.ParentID == client.Self.LocalID)
        //    {
        //        EnsureSelected(prim.LocalID, simulator);
        //    }
        //    if (!MaintainAttachments) return;
        //    Objects_OnNewPrim(simulator, prim, regionHandle, timeDilation);
        //    EventQueue.Enqueue(() => GetSimObject(prim, simulator).IsAttachment = true);
        //}

        public override void Avatars_OnAvatarAppearance(object sender, AvatarAppearanceEventArgs e)
        {
            client.Avatars.AvatarAppearance -= Avatars_OnAvatarAppearance;
            base.Avatars_OnAvatarAppearance(sender, e);
        }
Пример #6
0
        /// <summary>
        /// Save information about an avatar's appearance
        /// </summary>
        /// <param name="avatarID"></param>
        /// <param name="isTrial"></param>
        /// <param name="defaultTexture"></param>
        /// <param name="faceTextures"></param>
        /// <param name="visualParams"></param>
        void Avatars_OnAvatarAppearance(
            object sender,
            AvatarAppearanceEventArgs e)
        {
            List<byte> visualParams = e.VisualParams;

            // Create an entry in the avatar information dictionary.
            if (visualParams.Count > 32)
            {
                AvatarInfo info = new AvatarInfo();
                info.gender = visualParams[31];
                info.height = visualParams[32];
                // We are only getting 218 parameters.
            //                info.leglen = visualParams[691];
                information[e.AvatarID] = info;

                // Check if a wrong voice has already been assigned, and reassign
                // if necessary.
                Talker.voices.CheckGender(e.AvatarID, info);
            }
        }
Пример #7
0
 public virtual void Avatars_OnAvatarAppearance(object sender, AvatarAppearanceEventArgs e) { OnEvent("On-Avatar-Appearance", paramNamesOnAvatarAppearance, paramTypesOnAvatarAppearance, e); }
Пример #8
0
    void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e)
    {
        if (Application.platform != RuntimePlatform.WindowsPlayer && Application.platform != RuntimePlatform.WindowsEditor) return;
        if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) return;

        OpenMetaverse.Avatar a = e.Simulator.ObjectsAvatars.Find(av => av.ID == e.AvatarID);
        if (a != null)
        {
            DownloadAVTextures(a);
            if (!avHasTex.Contains(a.LocalID))
                avHasTex.Add(a.LocalID);
        }
        Debug.Log("AvatarAppearance for " + a.Name + a.LocalID.ToString());
    }