Files
ichni_Official/Assets/Scripts/NewStorySystem/Helper/StaticStoryHelperVisualPresenter.cs
SoulliesOfficial 810d019619 剧情+对话完善
2026-07-21 15:24:42 -04:00

26 lines
969 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using UnityEngine;
using UnityEngine.UI;
namespace Ichni.Story
{
/// <summary>
/// 当前阶段使用 <see cref="Image"/> 显示静态 Helper 插画的 Presenter。
/// <para>若 StoryHelperData 未配置 portraitSprite则保留场景中已有的 Sprite 作为回退,
/// 方便在视觉资源尚未完全迁移时继续工作。</para>
/// </summary>
public class StaticStoryHelperVisualPresenter : StoryHelperVisualPresenter
{
[SerializeField, Tooltip("用于显示当前 Helper 静态立绘的 Image。")]
private Image portraitImage;
public override void ApplyHelper(StoryHelperData helperData)
{
if (portraitImage == null || helperData == null || helperData.portraitSprite == null)
return;
// 不调用 SetNativeSizeHelper 的实际 UI 尺寸由场景布局统一控制。
portraitImage.sprite = helperData.portraitSprite;
}
}
}