Scriptum/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs

42 lines
1.4 KiB
C#
Raw Normal View History

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-10-22 18:04:21 +02:00
// taskManager.SetList();
//SaveData(taskManager.GetList(), SceneElementTypeEnum.None);
2022-10-22 18:04:21 +02: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>();
}
}