private static IEnumerator AddNumberOf(InventoryItem inventoryItem, int remain) { while (remain-- > 0) { inventoryItem.ChangeTotalAmount(PhotonNetwork.LocalPlayer, 1); yield return(new WaitForSeconds(0.01f)); } }
// Token: 0x06000A43 RID: 2627 RVA: 0x0003F68C File Offset: 0x0003D88C public void MinusButton(InventoryItem item) { if (item.canChangeAmount) { for (int i = 0; i < item.players.Count; i++) { if (item.players[i].isLocalPlayer && item.players[i].currentAmount >= 1) { item.canChangeAmount = false; item.ChangeTotalAmount(PhotonNetwork.player.ID, -1); return; } } } }
// Token: 0x06000A41 RID: 2625 RVA: 0x0003F514 File Offset: 0x0003D714 public void AddButton(InventoryItem item) { if (item.canChangeAmount && item.totalAmount < item.maxAmount) { int i = 0; while (i < item.players.Count) { if (item.players[i].isLocalPlayer) { if (FileBasedPrefs.GetInt(item.itemName + "Inventory", 0) > item.players[i].currentAmount) { item.canChangeAmount = false; item.ChangeTotalAmount(PhotonNetwork.player.ID, 1); return; } break; } else { i++; } } } }