Beispiel #1
0
    public void EnterRoomBack(Proto.EnterRoomRsp msg)
    {
        SocketClient.OnClose(Svr_onClose);
        var trsm = transform.Find("chatPanel");

        trsm.gameObject.SetActive(true);
        trsm.GetComponent <Chat>().Init(msg);
    }
Beispiel #2
0
    public void Init(Proto.EnterRoomRsp msg)
    {
        meUid = msg.uid;
        transform.Find("top/roomName").GetComponent <Text>().text = msg.roomName;

        foreach (var one in msg.players)
        {
            NewPlayer(one);
        }

        SocketClient.AddHandler(Cmd.onNewPlayer, Svr_onNewPlayer);
        SocketClient.AddHandler(Cmd.onOneLeave, Svr_onOneLeave);
        SocketClient.AddHandler(Cmd.onChat, Svr_onChat);
    }