private void RemoveFromOtherPlayer(int invID, int amount, bool setAmount, int playerID) { SaveSystem saveSystem = GetComponent <SaveSystem>(); List <InvItem> otherPlayerItems = saveSystem.GetItemsFromPlayer(playerID); otherPlayerItems = Remove(invID, amount, setAmount, otherPlayerItems); saveSystem.AssignItemsToPlayer(otherPlayerItems, playerID); }
private void AddToOtherPlayer(int invID, int amount, int playerID) { SaveSystem saveSystem = GetComponent <SaveSystem>(); List <InvItem> otherPlayerItems = saveSystem.GetItemsFromPlayer(playerID); otherPlayerItems = Add(invID, amount, otherPlayerItems, false); saveSystem.AssignItemsToPlayer(otherPlayerItems, playerID); }