public AvatarContent(Vector2 position, string skeletonName) : base(position) { if (_skeleton == null) { _skeleton = new ComponentSetDisplayAvatar(); } _skeleton.Name = skeletonName; _skeleton.WorldPosition = position; _skeleton.CreateBonesFromDataManager(skeletonName); }
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); }
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); }