コード例 #1
0
    public void Init()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("ShopPanelScript_hotfix", "Init"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.ShopPanelScript_hotfix", "Init", null, null);
            return;
        }

        try
        {
            for (int i = shopDataList.Count - 1; i >= 0; i--)
            {
                uiWarpContent.DelItem(i);
            }
            _shopItemDatas = new List <ShopData>();
            for (int i = 0; i < shopDataList.Count; i++)
            {
                ShopData shopData = shopDataList[i];
                if (shopData.goods_type == _type)
                {
                    _shopItemDatas.Add(shopData);
                }
            }
            uiWarpContent.Init(_shopItemDatas.Count);
        }
        catch (Exception e)
        {
            LogUtil.Log(e.Message);
        }
    }
コード例 #2
0
    public void deleteItem(int dataindex)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("BagPanelScript_hotfix", "deleteItem"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.BagPanelScript_hotfix", "deleteItem", null, dataindex);
            return;
        }

        uiWarpContent.DelItem(dataindex);
    }
コード例 #3
0
    IEnumerator RemoveLevels(int levelCount, Button btn, int currentIndex)
    {
        int orignalIndex = currentIndex;

        for (int i = 0; i < levelCount; i++)
        {
            m_mapItems.RemoveAt(currentIndex + 1);
            m_wrapContent.DelItem(currentIndex + 1);
            yield return(new WaitForSeconds(0.1f));
        }

        AddExpandListener(btn, orignalIndex);
        btn.enabled = true;
    }
コード例 #4
0
 static int DelItem(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UIWarpContent obj  = (UIWarpContent)ToLua.CheckObject(L, 1, typeof(UIWarpContent));
         int           arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         obj.DelItem(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }