void onRoomList(NetWork.Msg msg) { Room.RoomListRsp rsp = (Room.RoomListRsp)msg.body; Room.EnterReq req = new Room.EnterReq(); req.room_id = 1; network.WriteMsg("Room.EnterReq", req); Debug.Log(rsp); }
void onRoomList(NetWork.Msg msg) { Room.RoomListRsp rsp = (Room.RoomListRsp)msg.body; Debug.Log("Room.RoomListRsp..." + rsp); Debug.Log("Get Room List...."); foreach (Room.RoomInfo room in rsp.list) { Debug.Log("Room:" + room.ToString()); } Debug.Log("Over...."); Room.EnterReq req = new Room.EnterReq(); req.room_id = 1; network.WriteMsg("Room.EnterReq", req); }
public static void EnterRoom() { Room.EnterReq room = new Room.EnterReq(); room.room_id = 1; NetClient.Instance().WriteMsg("Room.EnterReq", room); }