コード例 #1
0
ファイル: Avatar.cs プロジェクト: Blayer98/Project-Dollhouse
 public void AddAccessory(Appearance apr)
 {
     if (Accessories.ContainsKey(apr))
     {
         return;
     }
     var add = AddAppearance(apr);
     Accessories.Add(apr, add);
 }
コード例 #2
0
ファイル: Avatar.cs プロジェクト: sector-c/Project-Dollhouse
        protected AvatarAppearanceInstance AddAppearance(Appearance appearance)
        {
            var result = new AvatarAppearanceInstance();

            result.Bindings = new List <AvatarBindingInstance>();

            foreach (var bindingReference in appearance.Bindings)
            {
                var binding = Content.Get().AvatarBindings.Get(bindingReference.TypeID, bindingReference.FileID);
                if (binding == null)
                {
                    continue;
                }
                result.Bindings.Add(AddBinding(binding));
            }

            return(result);
        }
コード例 #3
0
ファイル: Avatar.cs プロジェクト: Blayer98/Project-Dollhouse
        protected AvatarAppearanceInstance AddAppearance(Appearance appearance)
        {
            var result = new AvatarAppearanceInstance();
            result.Bindings = new List<AvatarBindingInstance>();

            foreach (var bindingReference in appearance.Bindings)
            {
                var binding = Content.Get().AvatarBindings.Get(bindingReference.TypeID, bindingReference.FileID);
                if (binding == null) { continue; }
                result.Bindings.Add(AddBinding(binding));
            }

            return result;
        }
コード例 #4
0
ファイル: Avatar.cs プロジェクト: Blayer98/Project-Dollhouse
 public void RemoveAccessory(Appearance apr)
 {
     if (Accessories.ContainsKey(apr))
     {
         RemoveAppearance(Accessories[apr], true);
         Accessories.Remove(apr);
     }
 }