This commit is contained in:
SoulliesOfficial
2026-03-14 02:30:26 -04:00
parent cf86f0ee51
commit aee62cd637
2041 changed files with 246771 additions and 129128 deletions

View File

@@ -2,13 +2,15 @@ using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using Sirenix.OdinInspector;
using SLSUtilities.General;
using UnityEngine;
namespace Ichni
{
public class InformationTransistor : SerializedMonoBehaviour
public class InformationTransistor : Singleton<InformationTransistor>
{
public static InformationTransistor instance;
/// <summary>小写别名,兼容现有调用点</summary>
public new static InformationTransistor instance => Instance;
public bool isLoadedProject;
public string loadedProjectName;
@@ -16,17 +18,9 @@ namespace Ichni
public ProjectInformation_BM projectInfo_BM;
public SongInformation_BM songInfo_BM;
private void Awake()
protected override void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else if (instance != this)
{
Destroy(gameObject);
}
Initialize(true); // DontDestroyOnLoad 持久化单例
}
}
}