예제 #1
0
        public IdsContainer GetIdContainer(Items.BodyPart bodyPart)
        {
            IdsContainer result = null;

            idsDict.TryGetValue(bodyPart, out result);
            return(result);
        }
 void UnloadIdOnResources(Items.BodyPart targetPart, bool isWeapon, bool isLeft)
 {
     if (isWeapon)
     {
         IdsContainer c = r_manager.GetWeaponIdContainer(targetPart, isLeft);
         c.instId = -1;
     }
     else
     {
         IdsContainer c = r_manager.GetIdContainer(targetPart);
         c.instId = -1;
     }
 }
        public void StoreIdOnResources(Items.Item item, UI_Slot slot)
        {
            Items.BodyPart targetPart   = slot.bodyPart;
            int            targetInstId = -1;

            if (item != null)
            {
                targetPart   = item.bodyPart;
                targetInstId = item.instId;
            }

            if (item is Items.Weapon)
            {
                IdsContainer c = r_manager.GetWeaponIdContainer(targetPart, slot.isLeft);
                c.instId = targetInstId;
            }
            else
            {
                IdsContainer c = r_manager.GetIdContainer(targetPart);
                c.instId = targetInstId;
            }
        }