1
This commit is contained in:
52
Unity/Scripts/SubSystems/Save/SaveSystem.cs
Normal file
52
Unity/Scripts/SubSystems/Save/SaveSystem.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
|
||||
namespace BITKit.SubSystems.Save
|
||||
{
|
||||
public class SaveSystem : SubBITSystem
|
||||
{
|
||||
[BITCommand]
|
||||
public static void Save()
|
||||
{
|
||||
lock (saveInfos)
|
||||
{
|
||||
saveInfos.ForEach(x =>
|
||||
{
|
||||
x.Invoke(default, default);
|
||||
});
|
||||
}
|
||||
}
|
||||
[BITCommand]
|
||||
public static void Load()
|
||||
{
|
||||
lock (loadInfos)
|
||||
{
|
||||
loadInfos.ForEach(x =>
|
||||
{
|
||||
x.Invoke(default, default);
|
||||
});
|
||||
}
|
||||
}
|
||||
static IEnumerable<MethodInfo> saveInfos;
|
||||
static IEnumerable<MethodInfo> loadInfos;
|
||||
public override void OnCreate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnDestory()
|
||||
{
|
||||
//Save();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user