Esempio n. 1
0
        public void ItemtempDelete(int id)
        {
            Itemtemp itemtemp = itemtemp_repo.Get(d => d.id == id);

            itemtemp_repo.Delete(itemtemp);
            SubmitChanges();
        }
Esempio n. 2
0
        public mItemTemp ItemtempUpdate(mItemTemp upitem)
        {
            Itemtemp item = itemtemp_repo.Get(d => d.id == upitem.Id);

            upitem.ToDb(item);
            SubmitChanges();
            return(new mItemTemp(item));
        }
Esempio n. 3
0
        public int ItemtempAdd(mItemTemp itemtemp)
        {
            Itemtemp newitem = new Itemtemp();

            itemtemp_repo.Add(itemtemp.ToDb(newitem));
            SubmitChanges();
            return(newitem.id);
        }
Esempio n. 4
0
File: mItem.cs Progetto: itiki/Board
 public mItemTemp(Itemtemp it)
 {
     Id     = it.id;
     Act    = (eAct)it.act;
     Name   = it.name;
     ToHtml = it.toHtml;
     Props  = it.props;
 }
Esempio n. 5
0
    public void Setup(Itemtemp currentItem, ShopScrollList currentScrollList)
    {
        item             = currentItem;
        nameLabel.text   = item.itemName;
        priceLabel.text  = item.price.ToString();
        iconImage.sprite = item.icon;

        scrollList = currentScrollList;
    }
Esempio n. 6
0
 private void RemoveItem(Itemtemp itemToRemove, ShopScrollList shopList)
 {
     for (int i = shopList.itemList.Count - 1; i >= 0; i--)
     {
         if (shopList.itemList[i] == itemToRemove)
         {
             shopList.itemList.RemoveAt(i);
         }
     }
 }
Esempio n. 7
0
    public void TryTransferItemToOtherShop(Itemtemp item)
    {
        if (otherShop.gold >= item.price)
        {
            gold           += item.price;
            otherShop.gold -= item.price;
            AddItem(item, otherShop);
            RemoveItem(item, this);

            RefreshDisplay();
            otherShop.RefreshDisplay();
        }
    }
Esempio n. 8
0
    private void AddButtons()
    {
        for (int i = 0; i < itemList.Count; i++)
        {
            Itemtemp   item      = itemList[i];
            GameObject newButton = buttonObjectPool.GetObject();
            newButton.transform.SetParent(contentPanel, false);


            SampleButton sampleButton = newButton.GetComponent <SampleButton>();
            sampleButton.Setup(item, this);
        }
    }
Esempio n. 9
0
File: mItem.cs Progetto: itiki/Board
 public Itemtemp ToDb(Itemtemp db)
 {
     if (!string.IsNullOrEmpty(Name))
     {
         db.name = Name;
     }
     if (!string.IsNullOrEmpty(ToHtml))
     {
         db.toHtml = ToHtml;
     }
     if (!string.IsNullOrEmpty(Props))
     {
         db.props = Props;
     }
     db.act = (int)Act;
     return(db);
 }
Esempio n. 10
0
 private void AddItem(Itemtemp itemToAdd, ShopScrollList shopList)
 {
     shopList.itemList.Add(itemToAdd);
 }
Esempio n. 11
0
        public mItemTemp ItemtempGet(int id)
        {
            Itemtemp item = itemtemp_repo.Get(d => d.id == id);

            return(new mItemTemp(item));
        }