Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }