diff --git a/xiaofang/Assets/Prefabs/HYLPrefabs/Task.prefab b/xiaofang/Assets/Prefabs/HYLPrefabs/Task.prefab index cc1c84f2..cd883f08 100644 --- a/xiaofang/Assets/Prefabs/HYLPrefabs/Task.prefab +++ b/xiaofang/Assets/Prefabs/HYLPrefabs/Task.prefab @@ -228,9 +228,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 38588f1b7a4315d4fb6983d86e935d19, type: 3} m_Name: m_EditorClassIdentifier: - jr: {fileID: 0} - id: 0 - tasktxt: {fileID: 3645880154395566472} + taskId: 0 + taskName: + state: 0 + taskTxt: {fileID: 3645880154395566472} + Targets: [] --- !u!114 &2781362794876327239 MonoBehaviour: m_ObjectHideFlags: 0 @@ -254,8 +256,8 @@ MonoBehaviour: m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 1, g: 0, b: 0.85180044, a: 1} + m_SelectedColor: {r: 1, g: 0, b: 0.8509804, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 diff --git a/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs b/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs index 910089e3..656f1d4c 100644 --- a/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs +++ b/xiaofang/Assets/Prefabs/HYLPrefabs/TaskItem.cs @@ -36,11 +36,7 @@ public class TaskItem : MonoBehaviour taskName = info.Note; state = TaskState.NotStarted; - //// 从JSON加载目标 - //foreach (var target in info.Targets) - //{ - // Targets.Add(new TaskTarget((TargetType)target.TargetType, target.TargetID, target.Description, target.RequiredProgress)); - //} + Debug.Log(info.Targets1); UpdateTxt(); } @@ -53,8 +49,9 @@ public class TaskItem : MonoBehaviour { progressInfo += $"{target.Description}: {target.CurrentProgress}/{target.RequiredProgress}\n"; } - - taskTxt.text = $"{taskName}\n{progressInfo}"; + Debug.Log(taskName); + Debug.Log(progressInfo); + taskTxt.text = $"{taskName}"; } // 更新任务进度 diff --git a/xiaofang/Assets/Res/HYLUI/TaskPanel.cs b/xiaofang/Assets/Res/HYLUI/TaskPanel.cs index 6da73538..ef08aa81 100644 --- a/xiaofang/Assets/Res/HYLUI/TaskPanel.cs +++ b/xiaofang/Assets/Res/HYLUI/TaskPanel.cs @@ -31,7 +31,7 @@ public class TaskPanel : Base instance = this; hideBtn.onClick.AddListener(OnClickHideButton); InitList(); - //InitTask(taskIDs); + InitTask(taskIDs); } public void InitList()