예제 #1
0
파일: UIGM.cs 프로젝트: zhutaorun/unitygame
 protected void onBtnSendClk()
 {
     stKokChatUserCmd cmd = new stKokChatUserCmd();
     cmd.dwType = 2;
     cmd.pstrName = Ctx.m_instance.m_dataPlayer.m_dataMain.m_name;
     cmd.pstrChat = m_inputField.text;
     UtilMsg.sendMsg(cmd);
     m_inputField.text = "";              // 清空内容
 }
예제 #2
0
        public void psstKokChatUserCmd(ByteBuffer msg)
        {
            stKokChatUserCmd cmd = new stKokChatUserCmd();
            cmd.derialize(msg);

            IUIChat uiChat = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUIChat) as IUIChat;
            if(uiChat != null)
            {
                cmd.pstrChat = cmd.pstrChat.TrimEnd('\0');
                uiChat.outMsg(cmd.pstrChat);
            }
            else
            {
                Ctx.m_instance.m_dataPlayer.m_chatData.appendStr(cmd.pstrChat);
            }
        }