예제 #1
0
 private void UpdateInventoryIcons()
 {
     for (int i = 0; i < _inventorySize; ++i)
     {
         if (i < InventoryItems.Count)
         {
             _canvasManager.SetInventorySlotIcon(i, InventoryItems[i].InventoryIcon);
         }
         else
         {
             _canvasManager.ClearInventorySlotIcon(i);
         }
     }
 }
예제 #2
0
 //Update Inventory Icons
 private void UpdateInventoryIcons()
 {
     //go though the inventory slots
     for (int i = 0; i < inventorySize; ++i)
     {
         if (i < _inventory.Count)
         {
             _canvasManager.SetInventorySlotIcon(i, _inventory[i].inventoryIcon);
         }
         else
         {
             _canvasManager.ClearInventorySlotIcon(i);
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Method that will update the inventory icons
 /// </summary>
 private void UpdateInventoryIcons()
 {
     // A for cycle that will run through the inventory
     for (int i = 0; i < inventorySize; ++i)
     {
         // If it's less than the spaces available
         if (i < _inventory.Count)
         {
             // Will add it to the inventory, adding the icon to the slots
             _canvasManager.SetInventorySlotIcon(i, _inventory[i].inventoryIcon);
         }
         else
         {
             //Will clear the inventory's slots
             _canvasManager.ClearInventorySlotIcon(i);
         }
     }
 }