存档重构,游戏内容解锁机制;教程完善(未完成)

This commit is contained in:
SoulliesOfficial
2026-07-18 16:51:18 -04:00
parent d48ef1e65e
commit dda354ebb9
123 changed files with 4032 additions and 558 deletions

View File

@@ -19,12 +19,37 @@ namespace Ichni.Menu
enterGameButton.onClick.AddListener(EnterGame);
}
/// <summary>
/// 设置标准 Play 按钮是否允许进入游戏。
/// 当当前歌曲没有可用难度时由 DifficultySelectionContainer 关闭;歌曲锁定仍沿用原有的独立判断。
/// </summary>
public void SetEnterGameAvailable(bool isAvailable)
{
enterGameButton.interactable = isAvailable;
}
private void EnterGame()
{
if (MenuManager.instance.songSelectionUIPage.songListController.selectedTab.isLocked)
SongSelectionUIPage songSelectionUIPage = MenuManager.instance.songSelectionUIPage;
SongSelectionTab selectedTab = songSelectionUIPage.songListController.selectedTab;
// 即使 Button 的 interactable 状态被错误地恢复,也不能把空难度传给 InformationTransistor。
if (songSelectionUIPage.selectedSong == null || songSelectionUIPage.selectedDifficulty == null || selectedTab == null)
{
return;
}
// 不能只读取 Tab 的旧显示状态。解锁 Key 可能刚被剧情授予,或 UI 状态被其它逻辑改写;
// 标准 Play 与快速点击都会回到 UnlockSaveModule 的同一最终授权判断。
UnlockSaveModule unlockSaveModule = GameSaveManager.instance?.UnlockSaveModule;
if (unlockSaveModule == null || !unlockSaveModule.CanEnterSong(
ChapterSelectionManager.instance?.currentChapter,
songSelectionUIPage.selectedSong))
{
return;
}
selectedTab.RefreshUnlockState();
if (MenuManager.instance.isEnteringGame)
{
@@ -34,9 +59,9 @@ namespace Ichni.Menu
MenuManager.instance.isEnteringGame = true;
InformationTransistor.instance.SetInformation(
ChapterSelectionManager.instance.currentChapter,
MenuManager.instance.songSelectionUIPage.selectedSong,
MenuManager.instance.songSelectionUIPage.selectedDifficulty);
ChapterSelectionManager.instance.currentChapter,
songSelectionUIPage.selectedSong,
songSelectionUIPage.selectedDifficulty);
AudioManager.Post(AK.EVENTS.ENTERTOGAME);
SongSelectionManager.instance.StopPreviewSong();
@@ -61,4 +86,4 @@ namespace Ichni.Menu
arrowSeq.Play();
}
}
}
}