阶段性完成
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Localization;
|
||||
|
||||
namespace Ichni.Story
|
||||
{
|
||||
@@ -147,9 +148,9 @@ namespace Ichni.Story
|
||||
|
||||
[FoldoutGroup("$EditorHeader/Text Content")]
|
||||
[ShowIf("blockType", StoryBlockType.Text)]
|
||||
[LabelText("Title Key")]
|
||||
[Tooltip("该 TextBlock 标题使用的 Unity Localization Entry Key;留空时视觉层可使用 Block ID 作为开发阶段回退。")]
|
||||
public string titleKey;
|
||||
[LabelText("Title")]
|
||||
[Tooltip("该 TextBlock 的 Unity Localization String Reference。请在此直接选择 String Table 与 Entry;留空时视觉层使用 Block ID 作为开发阶段回退。")]
|
||||
public LocalizedString title = new LocalizedString();
|
||||
|
||||
/// <summary>
|
||||
/// TextBlock 的视觉和叙事层级。Important 用于主线转折与后续 checkpoint;
|
||||
@@ -229,7 +230,9 @@ namespace Ichni.Story
|
||||
{
|
||||
string title = blockType switch
|
||||
{
|
||||
StoryBlockType.Text => titleKey,
|
||||
StoryBlockType.Text => this.title != null && !this.title.IsEmpty
|
||||
? this.title.TableEntryReference.ToString()
|
||||
: null,
|
||||
StoryBlockType.Song => songName,
|
||||
StoryBlockType.Tutorial => tutorialName,
|
||||
_ => null
|
||||
|
||||
Reference in New Issue
Block a user