自动保存Beatmap
This commit is contained in:
@@ -15,6 +15,8 @@ namespace Ichni
|
||||
{
|
||||
public static EditorManager instance;
|
||||
|
||||
public bool isLoaded;
|
||||
|
||||
public ProjectManager projectManager;
|
||||
public MusicPlayer musicPlayer;
|
||||
public EditorUIManager uiManager;
|
||||
@@ -37,12 +39,13 @@ namespace Ichni
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
isLoaded = false;
|
||||
projectManager = new ProjectManager();
|
||||
operationManager = new OperationManager();
|
||||
|
||||
if (!ES3.FileExists(Application.streamingAssetsPath + "/EditorSettings.es3"))
|
||||
{
|
||||
editorSettings = new EditorSettings(300, 100, 100);
|
||||
editorSettings = new EditorSettings(300, 3, 100, 100);
|
||||
EditorSettings.SaveSettings(editorSettings);
|
||||
}
|
||||
else
|
||||
@@ -57,22 +60,25 @@ namespace Ichni
|
||||
this.elementGuid = Guid.Empty;
|
||||
uiManager.hierarchy.GenerateTab(this, null);
|
||||
StartCoroutine(DelayLoading());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(isLoaded) projectManager.autoSaveManager.UpdateAutoSave();
|
||||
}
|
||||
|
||||
public IEnumerator DelayLoading()
|
||||
{
|
||||
StartCoroutine(projectManager.loadManager.Load("TestProject"));
|
||||
musicPlayer.audioSource.clip = songInformation.song;
|
||||
yield return new WaitForSeconds(2);//什么时候能加个loading界面
|
||||
|
||||
|
||||
yield return new WaitForSeconds(1);//什么时候能加个loading界面
|
||||
|
||||
beatmapContainer.gameElementList.ForEach(gameElement =>
|
||||
{
|
||||
gameElement.AfterInitialize();
|
||||
gameElement.Refresh();
|
||||
});
|
||||
isLoaded = true;
|
||||
}
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user