public static ConfigWeatherData LoadFromFile(ConfigWeather config) { if (config == null) { return(null); } ConfigWeatherData data = new ConfigWeatherData(); if (!string.IsNullOrEmpty(config.renderingDataPath)) { data.configRenderingData = ConfigUtil.LoadConfig <ConfigBaseRenderingData>(config.renderingDataPath); } data.configSubWeathers = ConfigSubWeatherCollection.LoadFromFile(config); data.configSubWeathers.stageEffectSetting = config.stageEffectSetting; return(data); }
public static void ReloadFromFile() { _weatherDataDict = new Dictionary <string, ConfigWeatherData>(); string[] weatherEntryPathes = GlobalDataManager.metaConfig.weatherEntryPathes; for (int i = 0; i < weatherEntryPathes.Length; i++) { ConfigWeatherRegistry registry = ConfigUtil.LoadConfig <ConfigWeatherRegistry>(weatherEntryPathes[i]); if (registry.entries != null) { for (int j = 0; j < registry.entries.Length; j++) { ConfigWeatherEntry entry = registry.entries[j]; ConfigWeather config = Miscs.LoadResource <ConfigWeather>(entry.dataPath, BundleType.RESOURCE_FILE); _weatherDataDict.Add(entry.name, ConfigWeatherData.LoadFromFile(config)); } } } }
public void CopyFrom(ConfigWeather source) { this.renderingDataPath = source.renderingDataPath; this.rainPath = source.rainPath; }