Пример #1
0
 public override void DrawUi()
 {
     for (int y = 0; y < SlotsHeight; y++)
     {
         for (int x = 0; x < SlotsWidth; x++)
         {
             bool       isSelected = y == 0 && x == SelectedSlot;
             GameObject slot       = SlotController.DrawItemSlotWithSpriteAndDetails(
                 y,
                 x,
                 SlotPrefix,
                 Slots[y, x],
                 Parent.transform,
                 this,
                 DrawLeftPadding,
                 DrawBottomPadding,
                 isSelected,
                 GameObjectSlots);
             if (isSelected)
             {
                 InventorySlot invSlot           = slot.GetComponent <InventorySlot>();
                 Transform     selectedTransform = invSlot.transform;
                 selectedTransform.GetComponent <Image>().sprite = PrefabRepository.Instance.SlotSelectSprite;
             }
         }
     }
 }
Пример #2
0
 public void DrawGuiSlotAtPosition(int x, int y, bool isSelected)
 {
     SlotController.DrawItemSlotWithSpriteAndDetails(
         y,
         x,
         SlotPrefix,
         Slots[y, x],
         Parent.transform,
         this,
         DrawLeftPadding,
         DrawBottomPadding,
         isSelected, GameObjectSlots);
 }
Пример #3
0
 public virtual void DrawUi()
 {
     for (int y = 0; y < SlotsHeight; y++)
     {
         for (int x = 0; x < SlotsWidth; x++)
         {
             SlotController.DrawItemSlotWithSpriteAndDetails(
                 y,
                 x,
                 SlotPrefix,
                 Slots[y, x],
                 Parent.transform,
                 this,
                 DrawLeftPadding,
                 DrawBottomPadding,
                 false,
                 GameObjectSlots);
         }
     }
 }