예제 #1
0
 private void Take(ItemContainerBehaviour container)
 {
     if (!IsInvoking(nameof(DisableOptions)) && !IsInvoking("EnableOptions"))
     {
         if (GameObjectUtilities.FindGameObject("Game/Canvas/ItemPanel/ItemContainer_Inventory").GetComponent <ItemContainerBehaviour>().TryGetItem(out var inventory))
         {
             PlayerCommands.SwapInventoryItem(Id, container.ContainerIndex, inventory.Id);
         }
         else
         {
             PlayerCommands.PickupItem(Id);
         }
     }
 }