public void Init(DialogueDisplayData displayData, TextAlignmentOptions alignment, Color characterNameColor, Color textColor, string materialName, DialogueEntryLayoutSetting layoutSetting, int textLeftExtraPadding) { InitReferences(); this.displayData = displayData; this.alignment = alignment; this.characterNameColor = characterNameColor; this.textColor = textColor; this.materialName = materialName; this.layoutSetting = layoutSetting; this.textLeftExtraPadding = textLeftExtraPadding; UpdateText(); }
public DialogueEntryController AddEntry(DialogueDisplayData displayData, TextAlignmentOptions alignment, Color characterNameColor, Color textColor, string materialName, DialogueEntryLayoutSetting layoutSetting, int textLeftExtraPadding) { var dec = prefabFactory.Get <DialogueEntryController>(); var _transform = dec.transform; _transform.SetParent(transform); _transform.SetAsLastSibling(); _transform.localPosition = Vector3.zero; _transform.localRotation = Quaternion.identity; _transform.localScale = Vector3.one; _dialogueEntryControllers.Add(dec); dec.Init(displayData, alignment, characterNameColor, textColor, materialName, layoutSetting, textLeftExtraPadding); return(dec); }