public void SetSlotFromRight(int slotID, ref Item item) { //slots[slotID].item = item; // Update Slot's item //item.currentSlot = this.gameObject; // Update Item's slot //Update FlagStack if (flagStack.flags.Count < 5) { FlagStack.GetFS(flagStack).AddFlagAt(item.flagPrefab.GetComponent <Flag>(), slotID); // flagStack update } RefreshSlots(); //if (slots.Count < 5 && slotID == flagStack.flags.Count - 1) }
public void SetSlotFromLeft(int fromID, int toID) { FlagStack.GetFS(flagStack).SwapFlag(fromID, toID); RefreshSlots(); }
internal void RemoveItem(Item item) { FlagStack.GetFS(flagStack).RemoveFlagAt(item.currentSlot.GetComponent <Slot>().slotID); // flagStack update RefreshSlots(); }