Scriptum/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs
2022-11-07 23:06:06 +01:00

24 lines
657 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
public abstract class SaveModelSystem<T>
{
public string Path { get; set; }
public string ObjectListName { get; set; }
public string ObjectFolderName { get; set; }
protected string GetFileName(string _fileName)
{
return _fileName + ".fun";
}
public virtual bool SaveModelItem(T model) { return true; }
public virtual bool SaveModelList(List<T> list) { return true; }
public virtual T LoadModelItem() { return (T)Activator.CreateInstance(typeof(T), new object[] { }); }
public virtual List<T> LoadModelList() { return new List<T>(); }
}