某些优化
This commit is contained in:
@@ -5,9 +5,10 @@ using System.Linq;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.StartMenu
|
||||
{
|
||||
{
|
||||
public class LoadProjectModule : MonoBehaviour
|
||||
{
|
||||
public GameObject LoadProjectTab;
|
||||
@@ -17,6 +18,7 @@ namespace Ichni.StartMenu
|
||||
public List<string> projectFileList;
|
||||
public List<ProjectInformation_BM> projectInformationList;
|
||||
public List<SongInformation_BM> songInformationList;
|
||||
public Image MemuMask;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -39,7 +41,7 @@ namespace Ichni.StartMenu
|
||||
projectInformationList.Add(ES3.Load<ProjectInformation_BM>("ProjectInformation", projectInformationPath));
|
||||
songInformationList.Add(ES3.Load<SongInformation_BM>("SongInformation", songInformationPath));
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < projectInformationList.Count; i++)
|
||||
{
|
||||
var currentProject = projectInformationList[i];
|
||||
@@ -50,6 +52,7 @@ namespace Ichni.StartMenu
|
||||
|
||||
LoadProjectTab tab = LeanPool.Spawn(LoadProjectTab, loadTabList).GetComponent<LoadProjectTab>();
|
||||
tab.SetUpTab(projectName, lastSavedTime, songName);
|
||||
tab.MemuMask = MemuMask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ namespace Ichni.StartMenu
|
||||
public string projectName;
|
||||
public TMP_Text projectNameText, lastSavedTimeText, songNameText;
|
||||
public Button loadButton;
|
||||
|
||||
public Image MemuMask;
|
||||
public void SetUpTab(string projectName, string lastSavedTime, string songName)
|
||||
{
|
||||
this.projectName = projectName;
|
||||
|
||||
|
||||
projectNameText.text = projectName;
|
||||
lastSavedTimeText.text = lastSavedTime;
|
||||
songNameText.text = songName;
|
||||
@@ -28,9 +28,10 @@ namespace Ichni.StartMenu
|
||||
|
||||
private void LoadProject()
|
||||
{
|
||||
MemuMask.gameObject.SetActive(true);
|
||||
InformationTransistor.instance.isLoadedProject = true;
|
||||
InformationTransistor.instance.loadedProjectName = projectName;
|
||||
|
||||
|
||||
string projectPath = Application.streamingAssetsPath + "/Projects/" + projectName;
|
||||
InformationTransistor.instance.projectInfo_BM = ES3.Load<ProjectInformation_BM>("ProjectInformation", projectPath + "/ProjectInfo.json");
|
||||
InformationTransistor.instance.songInfo_BM = ES3.Load<SongInformation_BM>("SongInformation", projectPath + "/SongInfo.json");
|
||||
|
||||
Reference in New Issue
Block a user