private static void ImportEventSettings() { //Reset Settings _achievementSettings = new BibaAchievementSettings(); _specialSceneSettings = new BibaSpecialSceneSettings(); _pointEventSettings = new BibaPointEventSettings(); //Import Data ImportEventType(); ImportParameterType(); ImportEventSheet(COMMON_WORKSHEET_NAME); ImportEventSheet(BibaContentConstants.CI_GAME_ID, true); //Save Settings HelperMethods.WriteConstStringFile(BIBAGAME_NAMESPACE, typeof(BibaPointEvents).Name, _pointEventSettings.BibaPointSettings.Select(setting => setting.Id).ToList(), POINTEVENTS_CONSTANTS_FILEPATH); var jsonDataService = new JSONDataService(); jsonDataService.WriteToDisk <BibaAchievementSettings>(_achievementSettings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.ACHIEVEMENT_SETTINGS_FILE)); jsonDataService.WriteToDisk <BibaSpecialSceneSettings>(_specialSceneSettings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.SPECIAL_SCENE_SETTINGS_FILE)); jsonDataService.WriteToDisk <BibaPointEventSettings>(_pointEventSettings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.POINTEVENT_SETTINGS_FILE)); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }
static void ImportSpecialSceneSettings() { var settings = new BibaSpecialSceneSettings(); var timedEntries = GoogleSpreadsheetImporter.GetListEntries(TIMEDSCENE_SPREADSHEET_NAME, WORKSHEET_NAME); if (timedEntries == null) { return; } ParseTimedSceneSettings(timedEntries, ref settings); var localeBasedEntries = GoogleSpreadsheetImporter.GetListEntries(LOCALESCENE_SPREADSHEET_NAME, WORKSHEET_NAME); if (localeBasedEntries == null) { return; } ParseLocaleBasedSceneSettings(localeBasedEntries, ref settings); var jsonDataService = new JSONDataService(); jsonDataService.WriteToDisk <BibaSpecialSceneSettings>(settings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.SPECIAL_SCENE_SETTINGS_FILE)); }
static void ImportLocalizationSettings() { _settings = new BibaLocalizationSettings(); ParseSettingsForSheet(LOCALIZATION_SETTINGS_COMMON_WORKSHEET_NAME); ParseSettingsForSheet(LOCALIZATION_SETTINGS_WORKSHEET_NAME); var jsonDataService = new JSONDataService(); jsonDataService.WriteToDisk <BibaLocalizationSettings>(_settings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.LOCALIZATION_SETTINGS_FILE)); }
static void StoreBuildNumber() { var jsonService = new JSONDataService(); var versionFilePath = BibaEditorConstants.GetResourceFilePath(BibaContentConstants.BIBAVERSION_FILE); var version = jsonService.ReadFromDisk <BibaVersion> (versionFilePath); version.BuildNumber = JenkinsBuildNumber.ToString(); jsonService.WriteToDisk <BibaVersion> (version, versionFilePath); AssetDatabase.Refresh(); }
public static void CreateAchievementSettings() { _achievementSettings = new BibaAchievementSettings(); ImportBasicAchievementSettings(); ImportSeasonalAchievementSettings(); var jsonDataService = new JSONDataService(); jsonDataService.WriteToDisk <BibaAchievementSettings>(_achievementSettings, BibaEditorConstants.GetContentOutputPath(BibaContentConstants.ACHIEVEMENT_SETTINGS_FILE)); AssetDatabase.Refresh(); }