| | |
| | | var pack = pm.GetSceneInfo(scene.userSceneId); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString()); |
| | | var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId); |
| | | if (tempScene != null) |
| | | if (pack.Data != null) |
| | | { |
| | | scene.name = tempScene.name; |
| | | scene.delay = tempScene.delay; |
| | | scene.roomIds = tempScene.roomIds; |
| | | scene.functions = tempScene.functions; |
| | | var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString()); |
| | | var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId); |
| | | if (tempScene != null) |
| | | { |
| | | scene.name = tempScene.name; |
| | | scene.delay = tempScene.delay; |
| | | scene.roomIds = tempScene.roomIds; |
| | | scene.functions = tempScene.functions; |
| | | } |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | scene.functions.Remove(scenefunction); |
| | | continue; |
| | | } |
| | | //将spk实体里面的min max值放入场景功能实体里,要不然数据会丢失 2022-06-21 16:06:45 |
| | | foreach (var tt in scenefunction.status) { |
| | | tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; |
| | | tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; |
| | | tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; |
| | | try |
| | | { |
| | | //将spk实体里面的min max值放入场景功能实体里,要不然数据会丢失 2022-06-21 16:06:45 |
| | | foreach (var tt in scenefunction.status) |
| | | { |
| | | tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; |
| | | tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; |
| | | tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log($"场景加载功能列表异常:{ex.Message}"); |
| | | } |
| | | |
| | | i++; |