예제 #1
0
    /// <summary>
    /// Sends the message.
    /// </summary>
    /// <param name="pID">P I.</param>
    /// <param name="msg">Message.</param>
    /// <param name="action">Action.</param>
    public void sendMsg(LobbyProtocol pID, msgReqFeedback msg, Action <Message> action)
    {
        JsonObject jsonMsg = new JsonObject();

        jsonMsg.Add("type", (int)msg.type);
        jsonMsg.Add("content", msg.content);
        sendMsg(pID, jsonMsg, action);
    }
예제 #2
0
    public void onEventReqFeedback(object data)
    {
        LobbyEvent.sV2C_Feedback fb  = (LobbyEvent.sV2C_Feedback)data;
        msgReqFeedback           msg = new msgReqFeedback();

        msg.type    = fb.type;
        msg.content = fb.content;
        ProtocolManager.getInstance().sendMsg(LobbyProtocol.P_LOBBY_REQ_FEEDBACK, msg, OnRespFeedback);

        ViewManagerEvent.EM().InvokeEvent(ViewManagerEvent.EVENT.SHOW_LOADING_ANI, true);
    }
예제 #3
0
    void OnRespFeedback(Message msg)
    {
        ViewManagerEvent.EM().InvokeEvent(ViewManagerEvent.EVENT.SHOW_LOADING_ANI, false);

        msgReqFeedback resp = msgReqFeedback.deserialize(msg);

        if (resp.type == CommonDefine.eFeedbackType.DANMU)
        {
            //显示弹幕
        }
        else
        {
            CommonUtil.Util.showDialog("温馨提示", resp.content);
        }
    }