设置扩展
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user