| | |
| | | /// <summary> |
| | | /// 房间名 |
| | | /// </summary> |
| | | public string name; |
| | | public string name = "Room"; |
| | | /// <summary> |
| | | /// 房间ID |
| | | /// </summary> |
| | | public string sid; |
| | | /// <summary> |
| | | /// 楼层索引 |
| | | /// </summary> |
| | | public int floorIndex = -1; |
| | | |
| | | /// <summary> |
| | | /// 房间背景 |
| | |
| | | /// <summary> |
| | | /// 楼层 |
| | | /// </summary> |
| | | public string floor = ""; |
| | | public string floor { |
| | | get |
| | | { |
| | | string str = ""; |
| | | if (floorIndex != -1) |
| | | { |
| | | if (floorIndex < DB_ResidenceData.residenceData.floors.Count) |
| | | str = DB_ResidenceData.residenceData.floors[floorIndex]; |
| | | } |
| | | return str; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 房间添加的功能列表 |
| | | /// 保存功能ID |
| | | /// </summary> |
| | | public List<string> roomFunctionList = new List<string>(); |
| | | /// <summary> |
| | | /// 房间功能列表 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public List<Function> functions = new List<Function>(); |
| | | |
| | | /// <summary> |
| | | /// 房间添加的场景列表 |
| | | /// 保存场景ID |
| | | /// </summary> |
| | | public List<string> roomSceneList = new List<string>(); |
| | | /// <summary> |
| | | /// 房间场景列表 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public List<Scene> scenes = new List<Scene>(); |
| | | public void RefreshFunctions() |
| | | { |
| | | List<Function> funcList = new List<Function>(); |
| | | foreach (var f in DB_ResidenceData.residenceData.functionList.functions) |
| | | { |
| | | if (f.roomIdList.Contains(sid) && sid != null) |
| | | { |
| | | funcList.Add(f); |
| | | } |
| | | } |
| | | functions = funcList; |
| | | } |
| | | } |
| | | } |