Merge branch 'develop' into feature/extra-command
This commit is contained in:
@@ -77,10 +77,13 @@ namespace AibisDream
|
||||
// 生成新按钮
|
||||
foreach (DialogueOption option in dialogueOptions)
|
||||
{
|
||||
var choiceInstance = Instantiate(choiceButtonPrefab, Vector3.zero, Quaternion.identity);
|
||||
choiceInstance.transform.SetParent(choiceBox.transform);
|
||||
choiceInstance.GetComponentInChildren<TextMeshProUGUI>().text = option.Line.TextWithoutCharacterName.Text;
|
||||
choiceInstance.GetComponent<Button>().onClick.AddListener(() => onOptionSelected.Invoke(option.DialogueOptionID));
|
||||
if (option.IsAvailable)
|
||||
{
|
||||
var choiceInstance = Instantiate(choiceButtonPrefab, Vector3.zero, Quaternion.identity);
|
||||
choiceInstance.transform.SetParent(choiceBox.transform);
|
||||
choiceInstance.GetComponentInChildren<TextMeshProUGUI>().text = option.Line.TextWithoutCharacterName.Text;
|
||||
choiceInstance.GetComponent<Button>().onClick.AddListener(() => onOptionSelected.Invoke(option.DialogueOptionID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user