设置扩展

This commit is contained in:
SoulliesOfficial
2026-07-19 16:44:58 -04:00
parent dda354ebb9
commit 9fd5f098ab
110 changed files with 8386 additions and 2311 deletions

View File

@@ -156,8 +156,8 @@ namespace Ichni.Story.Dialogue
{
action?.Invoke();
}
MessageUIPage.instance.FadeIn();
// MessageUIPage 会在收到第一项消息/选项请求时自行开启统一队列与淡入,
// 此处不能再次直接 FadeIn否则会与当前弹窗流程重复播放页面动画。
}
if (storyUIPage != null)

View File

@@ -55,7 +55,8 @@ namespace Ichni.Story
if (!TrySetBoolAndSave(tutorialBlock.tutorialProgressVariable, true))
return false;
// completedBlockIds 只负责教程节点自身的 Completed 外观与不可重复点击
// completedBlockIds 只负责教程节点自身的 Completed 外观;
// Completed TutorialBlock 仍可点击,以便玩家重复进入教程。
// 后续节点应在 StoryData 中以 VariableCondition 读取上面的剧情变量。
treeController.OnBlockCompleted(tutorialBlock.blockId);
return true;

View File

@@ -1,5 +1,6 @@
using Ichni.Menu;
using Ichni.Menu.UI;
using Ichni.Story.UI;
using System.Collections.Generic;
using UnityEngine;
@@ -13,7 +14,7 @@ namespace Ichni.Story
public static class TutorialFlowController
{
/// <summary>
/// 由 <see cref="UI.TutorialBlockView"/> 点击时调用。配置无效或 SelectionBox 页面未配置时只报错,不修改剧情进度。
/// 由 <see cref="UI.TutorialBlockView"/> 点击时调用。配置无效或 MessageUIPage 未配置时只报错,不修改剧情进度。
/// </summary>
public static void RequestTutorial(StoryBlockDefinition tutorialBlock)
{
@@ -23,17 +24,16 @@ namespace Ichni.Story
return;
}
MenuManager menuManager = MenuManager.instance;
SelectionBoxUIPage selectionBoxPage = menuManager?.selectionBoxUIPage;
if (selectionBoxPage == null)
MessageUIPage messageUIPage = MessageUIPage.instance;
if (messageUIPage == null)
{
Debug.LogWarning("[TutorialFlowController] MenuManager 未配置 SelectionBoxUIPage教程不会被解锁。");
Debug.LogWarning("[TutorialFlowController] MessageUIPage 未就绪,教程不会被解锁。");
return;
}
// TutorialFlowController 只描述“有哪些选择、各自触发什么效果”;
// 具体按钮由通用 SelectionBox 在运行时生成,后续其它系统可复用同一 UI。
selectionBoxPage.Show(
messageUIPage.ShowSelectionBox(
tutorialBlock.tutorialName,
string.Empty,
new List<SelectionBoxOption>
@@ -105,7 +105,8 @@ namespace Ichni.Story
string.IsNullOrWhiteSpace(tutorialBlock.tutorialProgressVariable) ||
tutorialBlock.tutorialDifficultySaveId < 0)
{
Debug.LogWarning($"[TutorialFlowController] TutorialBlock '{tutorialBlock?.blockId}' 的 Tutorial Key、Progress Variable 或 Difficulty Save ID 未配置完整。");
Debug.LogWarning($"[TutorialFlowController] TutorialBlock '{tutorialBlock?.blockId}' 的 Tutorial Key、Progress Variable 或 Difficulty Save ID 未配置完整。\n" +
$"Tutorial Key:{tutorialBlock.tutorialKey}, Progress Variable:{tutorialBlock.tutorialProgressVariable}, Difficulty Save ID:{tutorialBlock.tutorialDifficultySaveId}");
return false;
}

View File

@@ -4,8 +4,9 @@ using UnityEngine;
namespace Ichni.Story.UI
{
/// <summary>
/// 教程块视图。点击后由 <see cref="TutorialFlowController"/> 显示确认窗口
/// 教程块视图。点击后由 <see cref="TutorialFlowController"/> 请求通用 SelectionBox
/// 玩家选择游玩或跳过时都会写入教程剧情变量并刷新故事树。
/// 节点处于 Completed 时仍保持可点击,方便玩家随时回顾教程。
/// </summary>
public class TutorialBlockView : StoryBlockView
{
@@ -25,16 +26,5 @@ namespace Ichni.Story.UI
TutorialFlowController.RequestTutorial(definition);
}
/// <summary>
/// 已处理的教程不再重复弹出“游玩 / 跳过”确认窗口。
/// 教程重玩将来应由独立的教程入口提供,不复用剧情进度节点。
/// </summary>
public override void ApplyState(StoryBlockState newState)
{
base.ApplyState(newState);
if (button != null && newState == StoryBlockState.Completed)
button.interactable = false;
}
}
}