基础内容-10
保存测试
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
@@ -17,6 +18,9 @@ namespace Ichni
|
||||
public BasePrefabsCollection basePrefabs;
|
||||
|
||||
public List<BaseElement> elementList = new List<BaseElement>();
|
||||
|
||||
public List<BaseElement_BM> elementList_BM = new List<BaseElement_BM>();
|
||||
public List<Submodule_BM> submoduleList_BM = new List<Submodule_BM>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -55,6 +59,20 @@ namespace Ichni
|
||||
e.AfterInitialize();
|
||||
e.Refresh();
|
||||
});
|
||||
|
||||
elementList.ForEach(e =>
|
||||
{
|
||||
e.SaveBM();
|
||||
e.submoduleList.RemoveAll(s=>s == null);
|
||||
e.submoduleList.ForEach(s => s.SaveBM());
|
||||
});
|
||||
|
||||
//Save
|
||||
elementList.ForEach(x => elementList_BM.Add(x.matchedBM));
|
||||
elementList.ForEach(x => submoduleList_BM.AddRange(x.submoduleList.ConvertAll(s => s.matchedBM)));
|
||||
ES3.Save<List<Submodule_BM>>("submoduleList", submoduleList_BM);
|
||||
ES3.Save<List<BaseElement_BM>>("elementList", elementList_BM);
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
Reference in New Issue
Block a user