42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
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);
|
|
|
|
// taskManager.SetList();
|
|
//SaveData(taskManager.GetList(), SceneElementTypeEnum.None);
|
|
|
|
|
|
//LoadData(SceneElementTypeEnum.None, ref StaticDataList);
|
|
//taskManager.SetList(StaticDataList.GetList());
|
|
}
|
|
|
|
protected SceneBaseDataManager<Task> GetObjectType()
|
|
{
|
|
return GameObject.FindObjectOfType<SceneTaskDataManager>();
|
|
}
|
|
|
|
protected SceneBaseDataManager<Task> CreateInstance(ref GameObject managerGameObject)
|
|
{
|
|
return managerGameObject.AddComponent<SceneTaskDataManager>();
|
|
}
|
|
}
|