更改文件架构
This commit is contained in:
52
Packages/Common~/Scripts/SubSystems/Save/SaveSystem.cs
Normal file
52
Packages/Common~/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();
|
||||
}
|
||||
}
|
||||
}
|
11
Packages/Common~/Scripts/SubSystems/Save/SaveSystem.cs.meta
Normal file
11
Packages/Common~/Scripts/SubSystems/Save/SaveSystem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c184421b3aec3b4db062385b51d954a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user