Exemplo n.º 1
0
 public AvatarContent(Vector2 position, string skeletonName)
     : base(position)
 {
     if (_skeleton == null)
     {
         _skeleton = new ComponentSetDisplayAvatar();
     }
     _skeleton.Name          = skeletonName;
     _skeleton.WorldPosition = position;
     _skeleton.CreateBonesFromDataManager(skeletonName);
 }
Exemplo n.º 2
0
        private void AddSkeletonForComponent(string skeletonName, AvatarComponent component, bool addBody)
        {
            ComponentSetDisplayAvatar avatar = new ComponentSetDisplayAvatar((component == null)  ? "none" : component.Name, 0.0f);

            avatar.CreateBonesFromDataManager(skeletonName);
            avatar.Name = skeletonName;

            if (addBody)
            {
                avatar.Components.Add(AvatarComponentManager.Component("body", "Blue"));
            }
            if (component != null)
            {
                avatar.Components.Add(component);
            }
            avatar.SkinFromComponents();
            avatar.RenderLayer = RenderLayer;

            AddItem(avatar);
        }
Exemplo n.º 3
0
        private void AddComponentSetDisplaySkeleton(AvatarComponentSet componentSet)
        {
            ComponentSetDisplayAvatar avatar = new ComponentSetDisplayAvatar(componentSet.Name, 0.0f);

            avatar.CreateBonesFromDataManager(componentSet.DisplaySkeleton);
            avatar.Name = componentSet.DisplaySkeleton;

            if (componentSet.Name != "body")
            {
                avatar.Components.Add(AvatarComponentManager.Component("body", "Blue"));
            }
            avatar.Components.Add((from c in componentSet.Components where c.Unlocked == true select c).First());
            avatar.SkinFromComponents();
            avatar.RenderLayer = RenderLayer;
            avatar.Annotation  = componentSet.Name;

            AddItem(avatar);

            _selectableComponentSets.Add(componentSet);
        }