Merge branch 'develop' into feature/extra-command

This commit is contained in:
2024-08-16 02:10:57 +08:00
56 changed files with 9469 additions and 1055 deletions
+7 -4
View File
@@ -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));
}
}
}