예제 #1
0
파일: Doll.cs 프로젝트: zaimoni/RSRevived
 public void RemoveDecoration(string imageID)
 {
     for (DollPart index = DollPart.NONE; index < DollPart._COUNT; ++index)
     {
         var x = GetDecorations(index);
         if (null != x && x.Remove(imageID) && 0 >= x.Count)
         {
             m_Decorations ![(int)index] = null;
예제 #2
0
        public void AddDecoration(DollPart part, string imageID)
        {
            List <string> partList = GetDecorations(part);

            if (partList == null)
            {
                partList = m_Decorations[(int)part] = new List <string>(1);
            }
            partList.Add(imageID);
        }
예제 #3
0
파일: Doll.cs 프로젝트: zaimoni/RSRevived
        public void AddDecoration(DollPart part, string imageID)
        {
#if DEBUG
            if (null == m_Decorations)
            {
                throw new ArgumentNullException(nameof(m_Decorations));
            }
#endif
            (GetDecorations(part) ?? (m_Decorations[(int)part] = new List <string>(1))).Add(imageID);
        }
예제 #4
0
 public ItemModel(Gameplay.GameItems.IDs _id, string aName, string theNames, string imageID, string flavor = "", DollPart part = DollPart.NONE, bool no_autoequip = false)
 {
     ID                = _id;
     SingleName        = aName;
     PluralName        = theNames;
     ImageID           = imageID;
     FlavorDescription = flavor;
     // if we are not equippable, then there is no operational difference whether we auto-equip or not.
     DontAutoEquip = DollPart.NONE == (EquipmentPart = part) || no_autoequip;
 }
예제 #5
0
        public void SetDollPart(DollPart part)
        {
            DollPart = part;
            if (mesh != null)
            {
                Destroy(mesh);
            }

            mesh = Instantiate(part.Go, transform);
        }
        public Item GetEquippedItem(DollPart part)
        {
            if (m_Inventory == null || part == DollPart.NONE)
            {
                return(null);
            }

            foreach (Item it in m_Inventory.Items)
            {
                if (it.EquippedPart == part)
                {
                    return(it);
                }
            }

            return(null);
        }
예제 #7
0
        public int CountDecorations(DollPart part)
        {
            List <string> partList = GetDecorations(part);

            return(partList == null ? 0 : partList.Count);
        }
예제 #8
0
 public List <string> GetDecorations(DollPart part)
 {
     return(m_Decorations[(int)part]);
 }
예제 #9
0
 public void RemoveDecoration(DollPart part)
 {
     m_Decorations[(int)part] = null;
 }
예제 #10
0
 public Item(ItemModel model)
 {
     m_ModelID     = model.ID;
     m_Quantity    = 1;
     m_EquipedPart = DollPart.NONE;
 }
예제 #11
0
 public ItemTrackerModel(Gameplay.GameItems.IDs _id, string aName, string theNames, string imageID, TrackingFlags tracking, int maxBatteries, DollPart part, string flavor)
     : base(_id, aName, theNames, imageID, flavor, part, true)
 {
     Tracking     = tracking;
     MaxBatteries = maxBatteries;
 }
예제 #12
0
파일: Doll.cs 프로젝트: AMartyn/RSRevived
 public List <string>?GetDecorations(DollPart part)
 {
     return(null != m_Decorations ? m_Decorations[(int)part] : null);
 }