Пример #1
0
    public bool SetBodySlotItem(BodySlotType bodySlotType, Item item)
    {
        if (bodySlotsInfo.ContainsKey(bodySlotType))
        {
            AddItem(bodySlotsInfo[bodySlotType]);
        }

        bodySlotsInfo[bodySlotType] = item;
        RemoveItem(item);

        return(true);
    }
Пример #2
0
    public bool SetBodySlotItem( BodySlotType bodySlotType, Item item )
    {
        if ( bodySlotsInfo.ContainsKey( bodySlotType ) ) {

            AddItem( bodySlotsInfo[bodySlotType] );
        }

        bodySlotsInfo[bodySlotType] = item;
        RemoveItem( item );

        return true;
    }
Пример #3
0
    public Transform[] GetBodySlots(BodySlotType type)
    {
        List <Transform> list = new List <Transform>();

        foreach (BodySlotType targetType in Enum.GetValues(typeof(BodySlot)))
        {
            if (CheckBodySlotType(type, targetType) && m_Slots[targetType] != null)
            {
                list.Add(m_Slots[targetType]);
            }
        }
        return(list.ToArray());
    }
Пример #4
0
 public Item GetBodySlotItem( BodySlotType bodySlotType )
 {
     return bodySlotsInfo.With( bodySlotType );
 }
Пример #5
0
 public Item GetBodySlotItem(BodySlotType bodySlotType)
 {
     return(bodySlotsInfo.With(bodySlotType));
 }
Пример #6
0
 public Transform GetBodySlot(BodySlotType type)
 {
     return(m_Slots[type]);
 }
Пример #7
0
 public static bool CheckBodySlotType(BodySlotType source, BodySlotType target)
 {
     return((source & target) == target);
 }