2022-10-22 18:04:21 +02:00
|
|
|
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class SceneTaskDataManager : SceneBaseDataManager<Task>
|
|
|
|
{
|
|
|
|
protected override string OBJECT_FOLDER_NAME { get { return "Quest"; } }
|
|
|
|
protected override string OBJECT_LIST_NAME { get { return "QuestsList"; } }
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
{
|
|
|
|
Debug.Log("Start SceneTaskdata manager");
|
|
|
|
|
|
|
|
//TaskUIManager.FindOrCreateInstance();
|
|
|
|
var taskManager = TaskUIManager.Instance;
|
|
|
|
|
|
|
|
if (taskManager == null)
|
|
|
|
throw new NullReferenceException("TaskUIManager not found!!!");
|
|
|
|
|
|
|
|
StaticDataList = (new TaskDataListManager()).SetUiManager(ref taskManager);
|
|
|
|
// DynamicDataList = (new TaskDataListManager()).SetUiManager(ref taskManager);
|
|
|
|
|
|
|
|
DataLoader = new SceneTaskDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME);
|
2022-11-19 17:02:31 +01:00
|
|
|
|
2022-10-22 18:04:21 +02:00
|
|
|
// taskManager.SetList();
|
2022-11-19 17:02:31 +01:00
|
|
|
//SaveData(taskManager.GetList(), SceneElementTypeEnum.None);
|
|
|
|
|
2022-10-22 18:04:21 +02:00
|
|
|
|
2022-11-19 17:02:31 +01:00
|
|
|
//LoadData(SceneElementTypeEnum.None, ref StaticDataList);
|
|
|
|
//taskManager.SetList(StaticDataList.GetList());
|
2022-10-22 18:04:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected SceneBaseDataManager<Task> GetObjectType()
|
|
|
|
{
|
|
|
|
return GameObject.FindObjectOfType<SceneTaskDataManager>();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected SceneBaseDataManager<Task> CreateInstance(ref GameObject managerGameObject)
|
|
|
|
{
|
|
|
|
return managerGameObject.AddComponent<SceneTaskDataManager>();
|
|
|
|
}
|
|
|
|
}
|