private void Awake() { m_Table = LuaUtility.GetNewLuaTable(); LuaTable newTable = LuaUtility.GetNewLuaTable(); newTable.Set <string, LuaTable>("__index", LuaUtility.Global); m_Table.SetMetaTable(newTable); newTable.Dispose(); LuaUtility.DoString(m_FilePath, this.gameObject.name, m_Table); Debug.Log(0x01); }
private void Init() { m_Table = LuaUtility.GetNewLuaTable(); LuaTable temp = LuaUtility.GetNewLuaTable(); temp.Set <string, LuaTable>("__index", LuaUtility.Global); m_Table.SetMetaTable(temp); temp.Dispose(); LuaUtility.DoString(m_FilePath, this.gameObject.name, m_Table); m_Table.Get <string, Action>("BindController", out bindController); m_Table.Get <string, Action>("AddListeners", out addListeners); m_Table.Get <string, Action>("OnPerOpen", out onPerOpen); m_Table.Get <string, Action>("OnAfterOpen", out onAfterOpen); m_Table.Get <string, Action>("OnPerClose", out onPerClose); m_Table.Get <string, Action>("OnAfterClose", out onAfterClose); }