少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-12 041b77f011062b5bab5216cf1b9e650e8e3e188d
Lua/LuaWindow.cs
@@ -9,6 +9,9 @@
[LuaCallCSharp]
public class LuaWindow : Window
{
    public string filePath = "";
    Action luaOnDestroy;
    Action onBindController;
@@ -30,7 +33,7 @@
        table.SetMetaTable(meta);
        meta.Dispose();
        LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, table);
        LuaUtility.Do(filePath, this.gameObject.name, table);
        table.Get("BindController", out onBindController);
        table.Get("AddListeners", out onAddListeners);
@@ -137,21 +140,4 @@
        }
    }
#if UNITY_EDITOR
    [ContextMenu("LuaReload")]
    public void ReLoadLua()
    {
        LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, table);
        if (onBindController != null)
        {
            onBindController();
        }
        if (onAddListeners != null)
        {
            onAddListeners();
        }
    }
#endif
}