static void SendChangeSingletonComponentMsg(SyncSession session, Protocol.ChangeSingletonComponentMsg msg)
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        data.Add("frame", msg.frame);
        {
            Dictionary <string, object> data2 = new Dictionary <string, object>();
            data2.Add("m_compname", msg.info.m_compName);
            data2.Add("content", msg.info.content);
            data.Add("info", data2);
        }
        session.SendMsg("changesingletoncomponentmsg", data);
    }
Beispiel #2
0
    static void SendChangeSingletonComponentMsg(IProtocolMessageInterface msg)
    {
        Protocol.ChangeSingletonComponentMsg e    = (Protocol.ChangeSingletonComponentMsg)msg;
        Dictionary <string, object>          data = new Dictionary <string, object>();

        data.Add("frame", e.frame);
        {
            Dictionary <string, object> data2 = new Dictionary <string, object>();
            data2.Add("m_compname", e.info.m_compName);
            data2.Add("content", e.info.content);
            data.Add("info", data2);
        }
        NetworkManager.SendMessage("changesingletoncomponentmsg", data);
    }
    static void ReceviceChangeSingletonComponentMsg(SyncSession session, ProtocolRequestBase e)
    {
        Protocol.ChangeSingletonComponentMsg msg = new Protocol.ChangeSingletonComponentMsg();
        msg.frame = (int)e.m_data["frame"];
        {
            Dictionary <string, object> data2 = (Dictionary <string, object>)e.m_data["info"];
            Protocol.ComponentInfo      tmp2  = new Protocol.ComponentInfo();
            tmp2.m_compName = data2["m_compname"].ToString();
            tmp2.content    = data2["content"].ToString();
            msg.info        = tmp2;
        }

        EventService.DispatchTypeEvent(session, msg);
    }
Beispiel #4
0
    static void ReceviceChangeSingletonComponentMsg(InputNetworkMessageEvent e)
    {
        Protocol.ChangeSingletonComponentMsg msg = new Protocol.ChangeSingletonComponentMsg();
        msg.frame = (int)e.Data["frame"];
        {
            Dictionary <string, object> data2 = (Dictionary <string, object>)e.Data["info"];
            Protocol.ComponentInfo      tmp2  = new Protocol.ComponentInfo();
            tmp2.m_compName = data2["m_compname"].ToString();
            tmp2.content    = data2["content"].ToString();
            msg.info        = tmp2;
        }

        GlobalEvent.DispatchTypeEvent(msg);
    }