public Door(Point _position, TextureType _type, Collectable.ItemType _key) { ID = IDcounter; IDcounter++; position = _position; key = _key; textureType = _type; closed = true; }
//if is in the inventory, remove collectable of specified type public static bool TryRemoveFromInventory(Collectable.ItemType itemType, Vector2 _targetPoint) { for (int i = collectedItems.Count - 1; i >= 0; i--) { if (collectedItems[i].type == itemType) { itemsBeingUsed.Add(collectedItems[i]); targetPoints.Add(_targetPoint); collectedItems.RemoveAt(i); return(true); } } return(false); }