Exemplo n.º 1
0
    /// <summary>
    /// Lua调用注册方法
    /// </summary>
    /// <param name="msgType"></param>
    /// <param name="call"></param>

    public static void RegisterMsgByLua(int msgType, SendRequestCall call)
    {
        RegisterResponseCallBack(msgType, (msg) =>
        {
            if (call != null)
            {
                call(msg.msgData);
            }
        });
    }
Exemplo n.º 2
0
    /// <summary>
    /// Lua调用方法
    /// </summary>
    /// <param name="data"></param>
    /// <param name="cmdId"></param>
    /// <param name="call"></param>

    public static void SendMsgByLua(byte[] data, int cmdId, SendRequestCall call, bool isShowLock = true)
    {
        SendRequestLuaMsg(data, cmdId, (msg) =>
        {
            SQDebug.Log("wor2222iyi=" + msg.msgData.Length);
            if (call != null)
            {
                call(msg.msgData);
            }
        }, isShowLock);
    }