예제 #1
0
 public override void OnDrop(UIBase ui)
 {
     if (ui is UIItemStack)
     {
         ItemStack = ui as UIItemStack;
     }
 }
예제 #2
0
        public bool AddItemStack(UIItemStack itemStack)
        {
            var cell = GetNotFullCellByInfoItem(itemStack.InfoItem);

            if (cell != null)
            {
                cell.ItemStack = itemStack;
                return(true);
            }
            else
            {
                foreach (var c in cells)
                {
                    if (c.ItemStack == null)
                    {
                        c.ItemStack = itemStack;
                        return(true);
                    }
                }
            }

            return(false);
        }