コード例 #1
0
        public ItemSlotPosition GetPosition(ItemType itemType, string modelName = "")
        {
            var key = ModelSlotPosition.CreateKey(itemType, modelName);

            if (ModelSlotPositionsSet.ContainsKey(key))
            {
                return(ModelSlotPositionsSet[key].position);
            }
            else if (ItemTypePositions.ContainsKey(itemType))
            {
                return(ItemTypePositions[itemType].position);
            }

            return(new ItemSlotPosition()
            {
                type = itemType,
                bone = defaultBone
            });
        }
コード例 #2
0
 public ModelSlotPosition GetModelSlotPosition(Item item)
 {
     return(ModelSlotPositionsSet.TryGetValue(ModelSlotPosition.CreateKey(item), out var result) ? result : null);
 }