public void OnCreate() { Maria.Message msg = new Maria.Message(); if (_provice == Provice.Sichuan) { var com = _SCPanel.GetComponent <CRScMahjong>(); msg[CrCode.provice] = Provice.Sichuan; msg[CrCode.hujiaozhuanyi] = com.HuJiaoZhuanYi; msg[CrCode.zimo] = com.ZiMo; msg[CrCode.dianganghua] = com.DianGangHua; msg[CrCode.daiyaojiu] = com.DaiYaoJiu; msg[CrCode.duanyaojiu] = com.DuanYaoJiu; msg[CrCode.jiangdui] = com.JiangDui; msg[CrCode.tiandihu] = com.TianDiHU; msg[CrCode.top] = com.Top; msg[CrCode.ju] = com.Ju; msg[CrCode.overtype] = _overtype; } else if (_provice == Provice.Shaanxi) { var com = _SXPanel.GetComponent <CRSxMahjong>(); msg[CrCode.provice] = Provice.Shaanxi; msg[CrCode.sxqidui] = com.SxHuQiDui; msg[CrCode.sxqingyise] = com.SxQingYiSe; msg[CrCode.ju] = com.Ju; msg[CrCode.overtype] = _overtype; } Maria.Command cmd = new Maria.Command(MyEventCmd.EVENT_MUI_CREATE, gameObject, msg); GetComponent <FindApp>().App.Enqueue(cmd); }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <Maria.Context>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { Maria.Context ctx = (Maria.Context)translator.GetObject(L, 2, typeof(Maria.Context)); uint cmd = LuaAPI.xlua_touint(L, 3); Maria.EventCmd __cl_gen_ret = new Maria.EventCmd(ctx, cmd); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <Maria.Context>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <Maria.Message>(L, 4)) { Maria.Context ctx = (Maria.Context)translator.GetObject(L, 2, typeof(Maria.Context)); uint cmd = LuaAPI.xlua_touint(L, 3); Maria.Message msg = (Maria.Message)translator.GetObject(L, 4, typeof(Maria.Message)); Maria.EventCmd __cl_gen_ret = new Maria.EventCmd(ctx, cmd, msg); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <Maria.Context>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.GameObject>(L, 4)) { Maria.Context ctx = (Maria.Context)translator.GetObject(L, 2, typeof(Maria.Context)); uint cmd = LuaAPI.xlua_touint(L, 3); UnityEngine.GameObject orgin = (UnityEngine.GameObject)translator.GetObject(L, 4, typeof(UnityEngine.GameObject)); Maria.EventCmd __cl_gen_ret = new Maria.EventCmd(ctx, cmd, orgin); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 5 && translator.Assignable <Maria.Context>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <UnityEngine.GameObject>(L, 4) && translator.Assignable <Maria.Message>(L, 5)) { Maria.Context ctx = (Maria.Context)translator.GetObject(L, 2, typeof(Maria.Context)); uint cmd = LuaAPI.xlua_touint(L, 3); UnityEngine.GameObject orgin = (UnityEngine.GameObject)translator.GetObject(L, 4, typeof(UnityEngine.GameObject)); Maria.Message msg = (Maria.Message)translator.GetObject(L, 5, typeof(Maria.Message)); Maria.EventCmd __cl_gen_ret = new Maria.EventCmd(ctx, cmd, orgin, msg); 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.EventCmd constructor!")); }
void Login(string code) { UnityEngine.Debug.Log(code); Maria.Message msg = new Maria.Message(); msg["username"] = code; msg["password"] = "******"; #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN msg["server"] = "sample1"; #elif UNITY_IOS || UNITY_ANDROID msg["server"] = "sample"; #endif Maria.Command cmd = new Maria.Command(MyEventCmd.EVENT_LOGIN, gameObject, msg); Bacon.GL.Util.App.current.Enqueue(cmd); }