2022-10-22 18:04:21 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2022-11-06 21:34:17 +01:00
|
|
|
using System.Linq;
|
2022-10-22 18:04:21 +02:00
|
|
|
|
|
|
|
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>(); }
|
2022-11-06 21:34:17 +01:00
|
|
|
|
2022-10-22 18:04:21 +02:00
|
|
|
}
|