private void SaveFile() { // Save Data m_DifficultyControlData = new DifficultyControlData(); m_DifficultyControlData.DifficultyConfig = new Dictionary <string, DifficultyConfig>(); if (m_lstDifficultyInfo == null) { m_lstDifficultyInfo = new List <DifficultyInfo>(); } for (int i = 0; i < m_lstDifficultyInfo.Count; i++) { if (m_lstDifficultyInfo[i].Name == null || m_lstDifficultyInfo[i].Name == "") { EditorUtility.DisplayDialog("保存失败", "难度名称不能为空", "确定"); return; } DifficultyConfig diffConfig = new DifficultyConfig(); diffConfig.DifficultyOffset = AdaptiveDifficultyManager.ConvertInt(m_lstDifficultyInfo[i].Offset); diffConfig.DifficultyRange = AdaptiveDifficultyManager.ConvertInt(m_lstDifficultyInfo[i].Range); diffConfig.TalentEffect = new Dictionary <string, int>(); foreach (string talent in m_lstDifficultyInfo[i].TalentEffects.Keys) { diffConfig.TalentEffect.Add(talent, AdaptiveDifficultyManager.ConvertInt(m_lstDifficultyInfo[i].TalentEffects[talent])); } m_DifficultyControlData.DifficultyConfig.Add(m_lstDifficultyInfo[i].Name, diffConfig); } //Save File EditorUtility.DisplayDialog("保存成功", "保存成功", "确定"); ADE_Helper.SaveDifficultyControlDataMap(m_DifficultyControlDataMap, m_GameID, m_DifficultyControlData); }
private void SaveFile() { //Convert Data m_EventControlData = new EventControlData(); m_EventControlData.EventConfig = new Dictionary <string, EventConfig>(); if (m_lstEventEffectInfo == null) { m_lstEventEffectInfo = new List <EventEffectInfo>(); } for (int i = 0; i < m_lstEventEffectInfo.Count; i++) { if (m_lstEventEffectInfo[i].EventName == null || m_lstEventEffectInfo[i].EventName == "") { EditorUtility.DisplayDialog("保存失败", "事件名称不能为空", "确定"); return; } EventConfig eventConfig = new EventConfig(); eventConfig.TalentEffect = new Dictionary <string, int>(); foreach (string talent in m_lstEventEffectInfo[i].TalentEffects.Keys) { eventConfig.TalentEffect.Add(talent, AdaptiveDifficultyManager.ConvertInt(m_lstEventEffectInfo[i].TalentEffects[talent])); } m_EventControlData.EventConfig.Add(m_lstEventEffectInfo[i].EventName, eventConfig); } //Save File EditorUtility.DisplayDialog("保存成功", "保存成功", "确定"); ADE_Helper.SaveEventControlDataMap(m_EventControlDataMap, m_GameID, m_EventControlData); }
private void SysnFile() { var option = EditorUtility.DisplayDialog("警告!!!", "同步方案将覆盖本地数据", "确定", "取消"); if (option) { ADE_Helper.SycnDifficultyControlDataMap(ref m_DifficultyControlDataMap); Refresh(); } }
private void SysnFile() { var option = EditorUtility.DisplayDialog("警告!!!", "同步方案将覆盖本地数据", "确定", "取消"); if (option) { ADE_Helper.SycnDefaultUserTalentMap(ref m_DefaultUserTalentData); Refresh(); } }
private void LoadFile() { //ADE data m_DefaultUserTalentData = ADE_Helper.GetDefaultUserTalentMap(); if (m_DefaultUserTalentData == null || m_DefaultUserTalentData.MapTalent == null) { return; } Refresh(); }
private void SaveFile() { //Convert Data m_DefaultUserTalentData = new DefaultUserTalent(); m_DefaultUserTalentData.MapTalent = new Dictionary <string, int>(); for (int i = 0; i < m_UserTalentCount; i++) { string name = m_lstUserTalents[i].TalentName; int value = AdaptiveDifficultyManager.ConvertInt(m_lstUserTalents[i].TalentValue); m_DefaultUserTalentData.MapTalent.Add(name, value); } //Save File EditorUtility.DisplayDialog("保存成功", "保存成功", "确定"); ADE_Helper.SaveDefaultUserTalentMap(m_DefaultUserTalentData); }
private void MergeFile() { ADE_Helper.MergeDifficultyControlDataMap(ref m_DifficultyControlDataMap); Refresh(); EditorUtility.DisplayDialog("合并成功", "合并成功", "确定"); }
private void LoadFile() { //ADE data m_DifficultyControlDataMap = ADE_Helper.GetDifficultyControlDataMap(); Refresh(); }
private void LoadFile() { //ADE data m_EventControlDataMap = ADE_Helper.GetEventControlDataMap(); Refresh(); }
private void MergeFile() { ADE_Helper.MergeDefaultUserTalentMap(ref m_DefaultUserTalentData); Refresh(); EditorUtility.DisplayDialog("合并成功", "合并成功", "确定"); }