| | |
| | | [LuaCallCSharp] |
| | | public class LuaWindow : Window |
| | | { |
| | | public string fileName; |
| | | |
| | | Action luaOnDestroy; |
| | | |
| | | Action onBindController; |
| | |
| | | scriptEnv.SetMetaTable(meta); |
| | | meta.Dispose(); |
| | | |
| | | LuaUtility.Do(fileName, "LuaWindow", scriptEnv); |
| | | LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, scriptEnv); |
| | | |
| | | scriptEnv.Get("BindController", out onBindController); |
| | | scriptEnv.Get("AddListeners", out onAddListeners); |
| | |
| | | |
| | | protected override void BindController() |
| | | { |
| | | |
| | | Init(); |
| | | |
| | | if (onBindController != null) |
| | |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | scriptEnv.Set("root",this.gameObject); |
| | | if (onAfterOpen != null) |
| | | { |
| | | onAfterOpen(); |