2026-04-27 대화 선택지 시스템

This commit is contained in:
2026-04-27 13:10:26 +09:00
parent 6c6cf63668
commit 5ed3f9f750
37 changed files with 918 additions and 181 deletions

View File

@@ -0,0 +1,29 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace VRShopping.UI
{
public class DialogChoiceRow : MonoBehaviour
{
[SerializeField] private TMP_Text _text;
[SerializeField] private Button _button;
public event Action<int> OnClicked;
private int _index;
private void Awake()
{
if (_button != null)
_button.onClick.AddListener(() => OnClicked?.Invoke(_index));
}
public void Bind(int index, string text)
{
_index = index;
if (_text != null) _text.text = text;
}
}
}