| | |
| | | { |
| | | this.Type = DeviceType.Scene; |
| | | DeviceTextID = SimpleControl.R.MyInternationalizationString.Scenes; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 场景唯一ID |
| | | /// </summary> |
| | | public string Sid = ""; |
| | | |
| | | /// <summary> |
| | | /// 场景小图标 |
| | |
| | | /// 场景的背景图 |
| | | /// </summary> |
| | | public string BackgroundImagePath = "Scene/s1.png"; |
| | | |
| | | /// <summary> |
| | | /// 场景保存路径 |
| | | /// </summary> |
| | | public string SceneFilePath = ""; |
| | | |
| | | /// <summary> |
| | | /// 根据场景路径恢复场景对象 |
| | |
| | | /// <param name="sceneFilePath">Scence file path.</param> |
| | | public void Save (string sceneFilePath) |
| | | { |
| | | if(string.IsNullOrEmpty(this.SceneFilePath) || this.SceneFilePath != sceneFilePath) { |
| | | this.SceneFilePath = sceneFilePath; |
| | | } |
| | | |
| | | IO.FileUtils.WriteFileByBytes (sceneFilePath, System.Text.Encoding.UTF8.GetBytes (Newtonsoft.Json.JsonConvert.SerializeObject (this))); |
| | | } |
| | | |