public App(Maria.Util.App app) : base(app) { _config = new AppConfig(); _ctx = new AppContext(this, _config, _tiSync); _dispatcher = _ctx.EventDispatcher; // enter for lua Main main = _luaenv.Global.Get <Main>("main"); _envScript = main(_ctx); _ctx.EnvScript = _envScript; _envScript.update(); _ctx.Client.ClintSockscript = _envScript.clientsock(); }
protected Maria.Util.App InitApp() { if (_app == null) { _app = GameObject.Find("App").GetComponent <Maria.Util.App>(); if (_app == null) { UnityEngine.Debug.Assert(false, "why "); return(null); } else { return(_app); } } else { return(_app); } }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <Maria.Util.App>(L, 2)) { Maria.Util.App app = (Maria.Util.App)translator.GetObject(L, 2, typeof(Maria.Util.App)); Maria.Application __cl_gen_ret = new Maria.Application(app); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to Maria.Application constructor!")); }