static int GetState(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); U3DEventFrame.MsgBase obj = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 1, typeof(U3DEventFrame.MsgBase)); byte o = obj.GetState(); LuaDLL.lua_pushnumber(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetNetBytes(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); U3DEventFrame.MsgBase obj = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 1, typeof(U3DEventFrame.MsgBase)); byte[] o = obj.GetNetBytes(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ChangeEventId(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); U3DEventFrame.MsgBase obj = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 1, typeof(U3DEventFrame.MsgBase)); ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2); obj.ChangeEventId(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SendMsg(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); U3DEventFrame.UIBase obj = (U3DEventFrame.UIBase)ToLua.CheckObject(L, 1, typeof(U3DEventFrame.UIBase)); U3DEventFrame.MsgBase arg0 = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 2, typeof(U3DEventFrame.MsgBase)); obj.SendMsg(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ProcessEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SigninSq obj = (SigninSq)ToLua.CheckObject(L, 1, typeof(SigninSq)); U3DEventFrame.MsgBase arg0 = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 2, typeof(U3DEventFrame.MsgBase)); obj.ProcessEvent(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SendMsg(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); U3DEventFrame.UIManager obj = (U3DEventFrame.UIManager)ToLua.CheckObject(L, 1, typeof(U3DEventFrame.UIManager)); U3DEventFrame.MsgBase arg0 = (U3DEventFrame.MsgBase)ToLua.CheckObject(L, 2, typeof(U3DEventFrame.MsgBase)); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); obj.SendMsg(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_msgId(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); U3DEventFrame.MsgBase obj = (U3DEventFrame.MsgBase)o; ushort ret = obj.msgId; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index msgId on a nil value" : e.Message)); } }
static int set_msgId(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); U3DEventFrame.MsgBase obj = (U3DEventFrame.MsgBase)o; ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2); obj.msgId = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index msgId on a nil value" : e.Message)); } }
static int _CreateU3DEventFrame_MsgBase(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { U3DEventFrame.MsgBase obj = new U3DEventFrame.MsgBase(); ToLua.PushObject(L, obj); return(1); } else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(byte[]))) { byte[] arg0 = ToLua.CheckByteBuffer(L, 1); U3DEventFrame.MsgBase obj = new U3DEventFrame.MsgBase(arg0); ToLua.PushObject(L, obj); return(1); } else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(ushort))) { ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 1); U3DEventFrame.MsgBase obj = new U3DEventFrame.MsgBase(arg0); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: U3DEventFrame.MsgBase.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void AnasysisMsg(MsgBase tmpBody) { if (tmpBody == null) { return; } //0 3000 6000 int tmpid = tmpBody.GetManager(); // Debug.Log("AnasysisMsg ============="+ tmpBody.msgId); //if (tmpid < (int)ManagerID.NetManager) //{ // //lua // // Debuger.Log("sendmsg to lua =="+tmpBody.msgId); // LuaEventProcess.instance.ProcessEvent(tmpBody); //} // else // { // switch (tmpid) // { // //16*3000 +2999 // case (ushort)ManagerID.AssetManager: // // 转发给 asset 模块 // AssetManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.AudioManager: // // ITools.Debugger("audio2"); // AudioManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.CharatorManager: // //Debug.Log("charactor =="+tmpBody.msgId); // CharaterManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.DataManager: // break; // case (ushort)ManagerID.GameManager: // GameManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.NetManager: // NetManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.NPCManager: // NPCManager.instance.ProcessEvent(tmpBody); // break; // case (ushort)ManagerID.UIManager: // // Debug.Log("ui is coming"); // UIManager.instance.ProcessEvent(tmpBody); // break; // //case ManagerID.LuaManager: // // // Debug.Log("ui is coming"); // // LuaEventProcess.instance.ProcessEvent(tmpBody); // // break; // default: // break; // } //} }
public override void SendMsg(MsgBase msg) { AssetManager.Instance.SendMsg(msg); }
public override void ProcessEvent(MsgBase tmpMsg) { //throw new System.NotImplementedException (); }
// all son send message public void SendMsg(MsgBase msg) { AssetManager.instance.SendMsg(msg); }
// all son send message public void SendMsg(MsgBase msg) { CharaterManager.instance.SendMsg(msg); }
public BackLinkList() { sendBackMsg = new MsgBase(); }
public virtual void ProcessEvent(MsgBase tmpMsg) { }
// all son send message public void SendMsg(MsgBase msg) { GameManager.instance.SendMsg(msg); }
public override void ProcessEvent(MsgBase tmpMsg) { }
// protected DataBase dataInstance; public abstract void ProcessEvent(MsgBase msg);
public virtual void SendMsg(MsgBase msg) { }
public override void SendMsg(MsgBase msg) { }