예제 #1
0
        /// <summary>
        /// Setup the content manager so it knows where to find various files.
        /// </summary>
        private void Init()
        {
            /** Scan system for files **/
            var allFiles = new List <string>();

            _ScanFiles(BasePath, allFiles);
            AllFiles = allFiles.ToArray();

            PIFFRegistry.Init("Content/Patch/");
            Archives = new Dictionary <string, FAR3Archive>();
            UIGraphics.Init();
            AvatarMeshes.Init();
            AvatarBindings.Init();
            AvatarTextures.Init();
            AvatarSkeletons.Init();
            AvatarAppearances.Init();
            AvatarOutfits.Init();
            AvatarAnimations.Init();
            Audio.Init();
            AvatarPurchasables.Init();
            AvatarHandgroups.Init();
            AvatarThumbnails.Init();

            InitWorld();
        }
예제 #2
0
        public void AvatarAnimationHandler(OpenMetaverse.Packets.Packet packet, Simulator sim)
        {
            // When animations for any avatar are received put them in the AvatarAnimations dictionary
            // in this module. They should be processed and deleted inbetween frames in the main frame loop
            // or deleted when an avatar is deleted from the scene.
            AvatarAnimationPacket animation = (AvatarAnimationPacket)packet;

            UUID        avatarID     = animation.Sender.ID;
            List <UUID> currentAnims = new List <UUID>();

            for (int i = 0; i < animation.AnimationList.Length; i++)
            {
                currentAnims.Add(animation.AnimationList[i].AnimID);
            }

            lock (AvatarAnimations)
            {
                if (AvatarAnimations.ContainsKey(avatarID))
                {
                    AvatarAnimations[avatarID] = currentAnims;
                }
                else
                {
                    AvatarAnimations.Add(avatarID, currentAnims);
                }
            }
        }
예제 #3
0
 public AnimationSet(AvatarAnimations animations)
 {
     Animations = animations;
     ResetDefaultAnimation();
 }