Storyline+Dialog初步
This commit is contained in:
28
Assets/Scripts/NewStorySystem/Tree/SongBlockView.cs
Normal file
28
Assets/Scripts/NewStorySystem/Tree/SongBlockView.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Story.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// 音乐块视图(占位)。点击后将切换到曲目选择并自动选中对应歌曲,后续阶段接入。
|
||||
/// </summary>
|
||||
public class SongBlockView : StoryBlockView
|
||||
{
|
||||
[Header("Song Block")]
|
||||
public TMP_Text songNameText;
|
||||
|
||||
public override void Initialize(StoryBlockDefinition def, Vector2 position, StoryBlockState blockState)
|
||||
{
|
||||
base.Initialize(def, position, blockState);
|
||||
|
||||
if (songNameText != null)
|
||||
songNameText.text = def.songName;
|
||||
}
|
||||
|
||||
protected override void OnClicked()
|
||||
{
|
||||
// 占位:后续接入曲目选择流程
|
||||
Debug.Log($"[SongBlockView] 点击音乐块 '{blockId}' (song='{definition.songName}')。占位实现,曲目选择将在后续阶段接入。");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user