예제 #1
0
 private ItemPosition GetExisted(FreeItem item)
 {
     foreach (ItemPosition ip in posList)
     {
         if (ip.key.GetKey().Equals(item.GetKey()))
         {
             return(ip);
         }
     }
     return(null);
 }
예제 #2
0
 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);
 }
예제 #3
0
 public override string ToString()
 {
     return(key.GetKey() + ":" + "x=" + x + " y=" + y + " w=" + key.GetWidth() + " h=" + key.GetHeight() + " count=" + count);
 }