using ShadowStudio.Model; using Studio.WebSocket.Message; using System.Collections; using System.Collections.Generic; using UnityEngine; public class RoomConfig:BaseConfig { private string id; private string type; private string room_name; private string room_explain; private string room_password; private string max_member; private string room_type; private string number; private List goods_list; private string nick_name; private string is_created; public string Id { get => id; set => id = value; } public string Type { get => type; set => type = value; } public string Room_name { get => room_name; set => room_name = value; } public string Room_explain { get => room_explain; set => room_explain = value; } public string Room_password { get => room_password; set => room_password = value; } public string Max_member { get => max_member; set => max_member = value; } public string Room_type { get => room_type; set => room_type = value; } public string Number { get => number; set => number = value; } public List Goods_list { get => goods_list; set => goods_list = value; } public string Nick_name { get => nick_name; set => nick_name = value; }//房间创始人的名字 public string Is_created { get => is_created; set => is_created = value; }//是否是自己创建的 1是 0不是 public RoomConfig(string id, string type, string room_name, string room_explain, string room_password, string max_member, string room_type, string number, string nick_name, string is_created, List goods_list = null) { this.id = id; this.type = type; this.room_name = room_name; this.room_explain = room_explain; this.room_password = room_password; this.max_member = max_member; this.room_type = room_type; this.number = number; this.nick_name = nick_name; this.is_created = is_created; this.goods_list = goods_list; } public RoomConfig(RoomNetData roomNetData, string is_created) { this.goods_list = new List(); for (int j = 0, goodCount = roomNetData.goods.Count; j < goodCount; j++) { GoodsInfo goodsInfo = new GoodsInfo(); goodsInfo.id = roomNetData.goods[j].id; goodsInfo.art_id = roomNetData.goods[j].art_id; goods_list.Add(goodsInfo); } this.id = roomNetData.roomID.ToString(); this.type = roomNetData.type.ToString(); this.room_name = roomNetData.roomName; this.room_explain = roomNetData.roomExplain; this.room_password = roomNetData.roomPassword; this.max_member = roomNetData.maxMember.ToString(); this.room_type = roomNetData.roomType.ToString(); this.number = roomNetData.number.ToString(); this.nick_name = roomNetData.nickName.ToString(); this.is_created = is_created; } }