private ItemPosition GetExisted(FreeItem item) { foreach (ItemPosition ip in posList) { if (ip.key.GetKey().Equals(item.GetKey())) { return(ip); } } return(null); }
private ItemPosition GetNotFullExisted(FreeItem item) { foreach (ItemPosition ip in posList) { if (ip.key.GetKey().Equals(item.GetKey())) { if (ip.GetCount() < item.GetItemStack()) { return(ip); } } } return(null); }
public override string ToString() { return(key.GetKey() + ":" + "x=" + x + " y=" + y + " w=" + key.GetWidth() + " h=" + key.GetHeight() + " count=" + count); }