public void Init(DailyTaskConfigData configData, STaskLogUpdate sTaskLogUpdate, STaskLogContext sTaskLogContext) { this.TaskID = configData._taskID; this.m_DailyTaskConfig = configData; Label_TaskDescription.text = LanguageTextManager.GetString(m_DailyTaskConfig._taskDescription);//任务描述 Label_ActiveValue.text = "+" + m_DailyTaskConfig._activeValue; UpdateView(sTaskLogUpdate, sTaskLogContext); }
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath) { if (CheckResModified(importedAssets) || CheckResModified(deletedAssets) || CheckResModified(movedAssets)) { string path = System.IO.Path.Combine(RESOURCE_TRAP_CONFIG_FOLDER, "DailyTask.xml"); TextReader tr = new StreamReader(path); string text = tr.ReadToEnd(); if (text == null) { Debug.LogError("Player level config file not exist"); return; } else { XmlSpreadSheetReader.ReadSheet(text); XmlSpreadSheet sheet = XmlSpreadSheetReader.Output; string[] keys = XmlSpreadSheetReader.Keys; object[] levelIds = sheet[keys[0]]; List <DailyTaskConfigData> tempList = new List <DailyTaskConfigData>(); for (int i = 0; i < levelIds.Length; i++) { if (0 == i || 1 == i) { continue; } DailyTaskConfigData data = new DailyTaskConfigData(); data._taskID = Convert.ToInt32(sheet["TaskID"][i]); data._taskType = Convert.ToInt32(sheet["TaskType"][i]); data._triggerCondition = Convert.ToInt32(sheet["TriggerCondition"][i]); data._taskDescription = Convert.ToString(sheet["TaskDescription"][i]); data._conditionParameter = Convert.ToInt32(sheet["ConditionParameter"][i]); data._activeValue = Convert.ToInt32(sheet["ActiveValue"][i]); data._quickTripTo = Convert.ToInt32(sheet["QuickTripTo"][i]); tempList.Add(data); } CreateSceneConfigDataBase(tempList); } } }