示例#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
文件: BodySlot.cs 项目: c2001324/Leo
    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
文件: BodySlot.cs 项目: c2001324/Leo
 public Transform GetBodySlot(BodySlotType type)
 {
     return(m_Slots[type]);
 }
示例#7
0
文件: BodySlot.cs 项目: c2001324/Leo
 public static bool CheckBodySlotType(BodySlotType source, BodySlotType target)
 {
     return((source & target) == target);
 }