Gruppe22.Backend.Actor.Items C# (CSharp) Method

Items() public method

Method to get the items an actor has.
public Items ( int i ) : Item
i int The id of the item
return Item
        public Item Items(int i)
        {
            for (int count = 0; count < inventory.Count; ++count)
            {
                if (_inventory[count].id == i) return _inventory[count];
            }
            return null;
        }