任务配置

This commit is contained in:
杨号敬 2024-12-16 15:28:35 +08:00
parent 7632a3f057
commit a7c5b49939
3 changed files with 12 additions and 13 deletions

View File

@ -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

View File

@ -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}";
}
// 更新任务进度

View File

@ -31,7 +31,7 @@ public class TaskPanel : Base
instance = this;
hideBtn.onClick.AddListener(OnClickHideButton);
InitList();
//InitTask(taskIDs);
InitTask(taskIDs);
}
public void InitList()