Exemplo n.º 1
0
    private void OnChatEvent(SprotoTypeBase evt)
    {
        SprotoType.chat_msg.request res = evt as SprotoType.chat_msg.request;
        Text item = GameObject.Instantiate(Item, Item.transform.parent, false);

        item.text = res.msg;
        item.gameObject.SetActive(true);
    }
Exemplo n.º 2
0
 public void OnBtnSendClick()
 {
     if (string.IsNullOrEmpty(inputChat.text))
     {
         return;
     }
     SprotoType.chat_msg.request req = new SprotoType.chat_msg.request();
     req.msg = inputChat.text;
     ClientNet.inst.Send <Protocol.chat_msg>(req);
     inputChat.text = "";
 }