示例#1
0
        public void Drop(ItemPart item)
        {
            //Contract.Requires(HasItem(item));
            if (!NormalMovement.IsOnGround())
            {
                return;
            }
            Items.Remove(item);

            item.PlaceOnIsland(NormalMovement.GetPositionIsland());
        }
示例#2
0
        public void Pickup(ItemPart item)
        {
            //Contract.Requires(!HasItem(item));
            if (!CanPickup(item.Type, 1))
            {
                return;
            }

            Items.Add(item);

            item.RemoveFromIsland();
        }
示例#3
0
 private bool HasItem(ItemPart item)
 {
     return(Items.Contains(item));
 }