示例#1
0
 // 图标被点中展示物品信息
 void ChildItemIconClick(SysShopPageItem curItem)
 {
     HighLightItem(curItem);
     if (null != SysShopController.Instance())
     {
         SysShopController.Instance().ShowCurItemTip();
     }
 }
示例#2
0
 void OnDisable()
 {
     if (null != m_curHighLightItem)
     {
         m_curHighLightItem.EnableHighLight(false);
         m_curHighLightItem = null;
     }
 }
示例#3
0
    public void HighLightItem(SysShopPageItem curItem)
    {
        if (m_curHighLightItem != null)
        {
            m_curHighLightItem.EnableHighLight(false);
        }

        if (null != curItem)
        {
            curItem.EnableHighLight(true);
        }

        m_curHighLightItem = curItem;
    }
示例#4
0
    public void AddItem(GameObject curItem, int index, int shopIndex, Tab_SystemShop tabSysShop)
    {
        if (null == curItem)
        {
            return;
        }

        //curItem.transform.localPosition = new Vector3(xStartPos + widthDiff * (index % 2), yStartPos - heightDiff * (index /2));
        SysShopPageItem shopPageItem = curItem.GetComponent <SysShopPageItem>();

        if (null != shopPageItem)
        {
            shopPageItem.SetData(ChildItemClick, ChildItemDoubleClick, ChildItemIconClick, shopIndex, tabSysShop);
        }
    }
示例#5
0
    // 批量购买确定
    void OnNumChoose(int curNum)
    {
        if (null == m_curShowPage)
        {
            LogModule.ErrorLog("curShowPage can not find");
            return;
        }

        SysShopPageItem curItem = m_curShowPage.GetComponent <SysShopPage>().GetCurHighLightItem();

        if (null == curItem)
        {
            LogModule.ErrorLog("cur select item is none");
            return;
        }

        BuyItem(curItem.gameObject.name, curNum);
    }
示例#6
0
    void CloseCurItemTip()
    {
        SysShopPageItem curItem = GetSelectedItem();

        if (null == curItem)
        {
            return;
        }

        if (curItem.GetGameItem().IsEquipMent())
        {
            UIManager.CloseUI(UIInfo.EquipTooltipsRoot);
        }
        else
        {
            UIManager.CloseUI(UIInfo.ItemTooltipsRoot);
        }
    }
示例#7
0
    // 购买当前选中物品
    public void BuyCurItem()
    {
        CloseCurItemTip();
        if (null != m_curShowPage)
        {
            SysShopPage curPage = m_curShowPage.GetComponent <SysShopPage>();
            if (curPage == null)
            {
                return;
            }
            SysShopPageItem curItem = curPage.GetCurHighLightItem();
            if (curItem == null)
            {
                return;
            }

            BuyItem(curItem.gameObject.name, 1);
        }
    }
示例#8
0
    // 显示当前物品信息
    public void ShowCurItemTip()
    {
        SysShopPageItem curItem = GetSelectedItem();

        if (null == curItem)
        {
            return;
        }

        if (curItem.GetGameItem().IsEquipMent())
        {
            EquipTooltipsLogic.SetDelegateBuyClick(EquipBuyBatchClick, EquipBuyClick);
            //             EquipTooltipsLogic.ShowEquipTooltip(curItem.GetGameItem(),
            //             m_curShopTable.CanBuyMulty > 0 ? EquipTooltipsLogic.ShowType.ShopBuyBatch : EquipTooltipsLogic.ShowType.ShopBuy);
            EquipTooltipsLogic.ShowEquipTooltip(curItem.GetGameItem(), EquipTooltipsLogic.ShowType.Info);
        }
        else
        {
            ItemTooltipsLogic.SetDelegateBuyClick(ItemBuyBatchClick, ItemBuyClick);
            //              ItemTooltipsLogic.ShowItemTooltip(curItem.GetGameItem(),
            //              m_curShopTable.CanBuyMulty > 0 ? ItemTooltipsLogic.ShowType.ShopBuyBatch : ItemTooltipsLogic.ShowType.ShopBuy,null);
            ItemTooltipsLogic.ShowItemTooltip(curItem.GetGameItem(), ItemTooltipsLogic.ShowType.Info);
        }
    }
示例#9
0
 // 双击直接购买
 void ChildItemDoubleClick(SysShopPageItem curItem)
 {
     HighLightItem(curItem);
     SysShopController.BuyItem(curItem.name, 1);
 }
示例#10
0
 // 点中高亮
 void ChildItemClick(SysShopPageItem curItem)
 {
     HighLightItem(curItem);
 }