剧情+对话完善
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AK.Wwise;
|
||||
using Ichni.Menu;
|
||||
using Ichni.Story;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
@@ -28,6 +29,12 @@ namespace Ichni
|
||||
/// </summary>
|
||||
public MenuReturnDestination menuReturnDestination;
|
||||
|
||||
/// <summary>
|
||||
/// 由剧情 SongBlock 发起的单次选曲上下文。它是运行时路由数据,不属于玩家存档;
|
||||
/// 仅用于校验目标歌曲、决定返回页面并还原剧情树浏览位置。
|
||||
/// </summary>
|
||||
[System.NonSerialized] public StorySongEntryContext storySongEntryContext = new StorySongEntryContext();
|
||||
|
||||
public ChapterSelectionUnit chapter;
|
||||
public SongItemData song;
|
||||
public DifficultyData difficulty;
|
||||
@@ -57,7 +64,12 @@ namespace Ichni
|
||||
{
|
||||
// 保留旧入口,供现有选曲流程在播放过场前预先写入歌曲信息。
|
||||
// 真正进入 GameScene 时,MenuManager.EnterGame 会补充 SongSelection 返回目标。
|
||||
PrepareGameLaunch(chapter, song, difficulty, MenuReturnDestination.None);
|
||||
if (PrepareGameLaunch(chapter, song, difficulty, MenuReturnDestination.None))
|
||||
{
|
||||
// 只有玩家真正确认“进入游戏”且命中剧情目标歌曲时,才完成对应 SongBlock。
|
||||
// 单纯从剧情打开选曲、浏览其它歌曲或返回菜单都不会写入剧情进度。
|
||||
StoryManager.instance?.HandleSongSelectionConfirmed(chapter, song);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -79,6 +91,10 @@ namespace Ichni
|
||||
chapterSwitch = chapter.chapterSwitch;
|
||||
songSwitch = song.songSwitch;
|
||||
menuReturnDestination = returnDestination;
|
||||
|
||||
// “确认进入游戏”是歌曲尝试的统一边界。无论入口来自普通选曲、Story SongBlock 或教程,
|
||||
// 都由 SongSaves 记录这一次尝试;StoryTree 会在构建/返回时据此同步 SongBlock 完成状态。
|
||||
GameSaveManager.instance?.SongSaveModule?.MarkSongTried(song.songName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace Ichni
|
||||
// 不能依赖旧场景中残留的 Block 实例。
|
||||
StoryManager.instance?.OpenChapter(ChapterSelectionManager.instance.currentChapter.chapterIndex);
|
||||
storyUIPage.FadeIn();
|
||||
StoryManager.instance?.RestoreStoryAfterGameReturn();
|
||||
}
|
||||
|
||||
// 返回目标是一次性运行态信息。无论是否能恢复页面,都不能让它在下次重进菜单时重复生效。
|
||||
@@ -96,7 +97,14 @@ namespace Ichni
|
||||
{
|
||||
public void EnterGame()
|
||||
{
|
||||
EnterGame(MenuReturnDestination.SongSelection);
|
||||
// 剧情 SongBlock 仅在玩家确认进入指定目标歌曲后才要求返回剧情;
|
||||
// 普通选曲与从剧情入口改选其它歌曲都继续返回选曲页。
|
||||
StorySongEntryContext context = InformationTransistor.instance?.storySongEntryContext;
|
||||
MenuReturnDestination destination = context != null && context.isActive &&
|
||||
context.returnToStoryAfterGame
|
||||
? MenuReturnDestination.Story
|
||||
: MenuReturnDestination.SongSelection;
|
||||
EnterGame(destination);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user