示例#1
0
 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));
     }
 }
示例#2
0
 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));
     }
 }
示例#3
0
 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));
     }
 }
示例#4
0
 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));
     }
 }
示例#5
0
 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));
     }
 }
示例#7
0
    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));
        }
    }
示例#8
0
    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));
        }
    }
示例#9
0
    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));
        }
    }
示例#10
0
        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;


            //    }
            //}
        }
示例#11
0
 public override void SendMsg(MsgBase msg)
 {
     AssetManager.Instance.SendMsg(msg);
 }
示例#12
0
 public override void ProcessEvent(MsgBase tmpMsg)
 {
     //throw new System.NotImplementedException ();
 }
示例#13
0
        // all  son  send message

        public void SendMsg(MsgBase msg)
        {
            AssetManager.instance.SendMsg(msg);
        }
示例#14
0
        // all  son  send message

        public void SendMsg(MsgBase msg)
        {
            CharaterManager.instance.SendMsg(msg);
        }
示例#15
0
 public BackLinkList()
 {
     sendBackMsg = new MsgBase();
 }
示例#16
0
 public virtual void ProcessEvent(MsgBase tmpMsg)
 {
 }
示例#17
0
        // all  son  send message

        public void SendMsg(MsgBase msg)
        {
            GameManager.instance.SendMsg(msg);
        }
示例#18
0
 public override void ProcessEvent(MsgBase tmpMsg)
 {
 }
示例#19
0
 //	protected  DataBase dataInstance;
 public abstract void ProcessEvent(MsgBase msg);
示例#20
0
 public virtual void SendMsg(MsgBase msg)
 {
 }
示例#21
0
 public override void SendMsg(MsgBase msg)
 {
 }