public void Drop(ItemPart item) { //Contract.Requires(HasItem(item)); if (!NormalMovement.IsOnGround()) { return; } Items.Remove(item); item.PlaceOnIsland(NormalMovement.GetPositionIsland()); }
public void Pickup(ItemPart item) { //Contract.Requires(!HasItem(item)); if (!CanPickup(item.Type, 1)) { return; } Items.Add(item); item.RemoveFromIsland(); }
private bool HasItem(ItemPart item) { return(Items.Contains(item)); }