2026-07-05 16:08:23 -04:00
|
|
|
|
using TMPro;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ichni.Story.UI
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2026-07-19 16:44:58 -04:00
|
|
|
|
/// 教程块视图。点击后由 <see cref="TutorialFlowController"/> 请求通用 SelectionBox,
|
2026-07-18 16:51:18 -04:00
|
|
|
|
/// 玩家选择游玩或跳过时都会写入教程剧情变量并刷新故事树。
|
2026-07-19 16:44:58 -04:00
|
|
|
|
/// 节点处于 Completed 时仍保持可点击,方便玩家随时回顾教程。
|
2026-07-05 16:08:23 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class TutorialBlockView : StoryBlockView
|
|
|
|
|
|
{
|
|
|
|
|
|
[Header("Tutorial Block")]
|
|
|
|
|
|
public TMP_Text tutorialNameText;
|
|
|
|
|
|
|
|
|
|
|
|
public override void Initialize(StoryBlockDefinition def, Vector2 position, StoryBlockState blockState)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize(def, position, blockState);
|
|
|
|
|
|
|
|
|
|
|
|
if (tutorialNameText != null)
|
|
|
|
|
|
tutorialNameText.text = def.tutorialName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnClicked()
|
|
|
|
|
|
{
|
2026-07-18 16:51:18 -04:00
|
|
|
|
TutorialFlowController.RequestTutorial(definition);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-05 16:08:23 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|