2026-06-19 UI, UI로직
This commit is contained in:
25
Assets/My project/TruthFountain/Scripts/TruthQuestionData.cs
Normal file
25
Assets/My project/TruthFountain/Scripts/TruthQuestionData.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class TruthQuestionData
|
||||
{
|
||||
[Header("Question")]
|
||||
[TextArea(2, 5)]
|
||||
[SerializeField] private string questionText;
|
||||
|
||||
[TextArea(1, 3)]
|
||||
[SerializeField] private string hintText = "당신의 선택에 따라 코가 반응합니다.";
|
||||
|
||||
[Header("Choices")]
|
||||
[SerializeField] private TruthChoiceData[] choices;
|
||||
|
||||
public string QuestionText => questionText;
|
||||
public string HintText => hintText;
|
||||
public TruthChoiceData[] Choices => choices;
|
||||
|
||||
public bool IsValid()
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(questionText) && choices != null && choices.Length > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user