基础内容11 - SAVE LOAD EXPORT
This commit is contained in:
@@ -1,18 +1,80 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
public class ProjectInformation : MonoBehaviour
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
public class ProjectInformation : IBaseElement
|
||||
{
|
||||
public string projectName;
|
||||
public string creatorName;
|
||||
public string editorVersion;
|
||||
public string createTime;
|
||||
public string lastSaveTime;
|
||||
public List<string> selectedThemeBundleList;
|
||||
|
||||
public string projectPath;
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public string peojectInfoPath => projectPath + "/ProjectInfo.json";
|
||||
public string songInfoPath => projectPath + "/SongInfo.json";
|
||||
public string songPath => projectPath + EditorManager.instance.songInformation.songName + ".wav";
|
||||
public string beatmapPath => projectPath + "/Beatmap.json";
|
||||
public string CommandScriptsPath => projectPath + "/CommandScripts.json";
|
||||
|
||||
public ProjectInformation(string projectName, string creatorName, string editorVersion,
|
||||
string createTime, string lastSaveTime, List<string> selectedThemeBundleList)
|
||||
{
|
||||
this.projectName = projectName;
|
||||
this.creatorName = creatorName;
|
||||
this.editorVersion = editorVersion;
|
||||
this.createTime = createTime;
|
||||
this.lastSaveTime = lastSaveTime;
|
||||
this.selectedThemeBundleList = selectedThemeBundleList;
|
||||
|
||||
projectPath = Application.streamingAssetsPath + "/Projects/" + projectName;
|
||||
}
|
||||
|
||||
public void SaveBM()
|
||||
{
|
||||
matchedBM = new ProjectInformation_BM(projectName, creatorName, editorVersion,
|
||||
createTime, lastSaveTime, selectedThemeBundleList);
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
namespace Beatmap
|
||||
{
|
||||
|
||||
public class ProjectInformation_BM : BaseElement_BM
|
||||
{
|
||||
public string projectName;
|
||||
public string creatorName;
|
||||
public string editorVersion;
|
||||
public string createTime;
|
||||
public string lastSaveTime;
|
||||
public List<string> selectedThemeBundleList;
|
||||
|
||||
public ProjectInformation_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ProjectInformation_BM(string projectName, string creatorName, string editorVersion,
|
||||
string createTime, string lastSaveTime, List<string> selectedThemeBundleList)
|
||||
{
|
||||
this.projectName = projectName;
|
||||
this.creatorName = creatorName;
|
||||
this.editorVersion = editorVersion;
|
||||
this.createTime = createTime;
|
||||
this.lastSaveTime = lastSaveTime;
|
||||
this.selectedThemeBundleList = selectedThemeBundleList;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
EditorManager.instance.projectInformation = new ProjectInformation(projectName,
|
||||
creatorName, editorVersion, createTime, lastSaveTime, selectedThemeBundleList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user