示例#1
0
 public bool TryRemoveObjectFromBag(ItemBag bag, SObject item, int quantity, IList <Item> targetContainer, int targetContainerCapacity, bool playSoundEffect, out int movedQty)
 {
     if (bag == null || item == null || targetContainer == null)
     {
         movedQty = 0;
         return(false);
     }
     else
     {
         return(bag.MoveFromBag(item, quantity, out movedQty, playSoundEffect, targetContainer, targetContainerCapacity));
     }
 }
示例#2
0
 public bool TryRemoveObjectsFromBag(ItemBag bag, List <SObject> items, List <int> quantities, IList <Item> targetContainer, int targetContainerCapacity, bool playSoundEffect, out int totalMovedQty)
 {
     if (bag == null || items == null || quantities == null || targetContainer == null)
     {
         totalMovedQty = 0;
         return(false);
     }
     else
     {
         return(bag.MoveFromBag(items, quantities, out totalMovedQty, playSoundEffect, targetContainer, targetContainerCapacity));
     }
 }