少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-30 cde7bf68111e8d0ff25428528874f0f5a99a6428
4340 【前端】支持xlua方便IOS提审
3个文件已修改
37 ■■■■■ 已修改文件
Lua/LuaUtility.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/LuaWindow.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/RewardPreviewGroup.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/LuaUtility.cs
@@ -35,6 +35,8 @@
        Do("global.logex");
        Do("global.functions");
        Do("global.object");
        Do("global.define");
        Do("global.stringutil");
        lastGCTime = 0f;
    }
Lua/LuaWindow.cs
@@ -144,7 +144,7 @@
    [ContextMenu("LuaReload")]
    public void ReLoadLua()
    {
        LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, table);
        LuaUtility.Do(filePath, this.gameObject.name, table);
        if (onBindController != null)
        {
System/FindPrecious/RewardPreviewGroup.cs
@@ -49,6 +49,39 @@
            Display(items);
        }
        public void LuaDisplay(int[] itemIds, int[] itemCounts)
        {
            if (itemIds == null || itemCounts == null)
            {
                return;
            }
            var items = new List<Item>();
            var min = Mathf.Min(itemIds.Length, itemCounts.Length);
            for (int i = 0; i < min; i++)
            {
                items.Add(new Item(itemIds[i], itemCounts[i]));
            }
            Display(items);
        }
        public void LuaDisplay(int[] itemIds)
        {
            if (itemIds == null)
            {
                return;
            }
            var items = new List<Item>();
            for (int i = 0; i < itemIds.Length; i++)
            {
                items.Add(new Item(itemIds[i], 0));
            }
            Display(items);
        }
        public void Hide()
        {
            for (int i = 0; i < m_ItemBehaviours.Length; i++)