From 171bf03f3664226eeff2b20ee9bd2e914b63a17d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 13 三月 2020 09:18:50 +0800 Subject: [PATCH] 20200313 --- HDL_ON/Entity/Room.cs | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index 84d802a..68ca3dd 100644 --- a/HDL_ON/Entity/Room.cs +++ b/HDL_ON/Entity/Room.cs @@ -45,25 +45,22 @@ public int floorIndex = -1; /// <summary> - /// 鎴块棿娣诲姞鐨勫姛鑳藉垪琛� - /// 淇濆瓨鍔熻兘ID - /// </summary> - public List<string> roomFunctionList = new List<string>(); - /// <summary> /// 鎴块棿鍔熻兘鍒楄〃 /// </summary> [Newtonsoft.Json.JsonIgnore] - public List<Function> functions = new List<Function>(); + public List<Function> functionData = 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)) + { + funcList.Add(f); + } + } + functionData = funcList; + } } } -- Gitblit v1.8.0