示例#1
0
    public static void ChatboxRequest(string uname, string msg)
    {
        using (Packet _packet = new Packet((int)ClientPackets.chatboxRequest))
        {
            ClientData.Chatbox _chatbox = new ClientData.Chatbox(uname, msg);

            _packet.Write <ClientData.Chatbox>(_chatbox);
            SendTCPData(_packet);

            Debug.Log($"Your message: {msg}");
        }
    }
示例#2
0
 public static void ChatboxValidation(Packet _packet)
 {
     ClientData.Chatbox _chatbox = _packet.ReadObject <ClientData.Chatbox>();
     UIChatboxManager.instance.chatbox.PrintMessageOnChatBox($"{_chatbox.username}: {_chatbox.message}");
 }