Пример #1
0
        private void OnAddEntry(DialogueLog.Log log)
        {
            GameObject prefab   = log.isChoice ? this.logPrefabChoice : this.logPrefabText;
            GameObject instance = Instantiate(prefab, this.logsContainer);

            instance.transform.localPosition = Vector3.zero;
            instance.transform.localRotation = Quaternion.identity;
            instance.transform.localScale    = Vector3.one;

            DialogueLogUIElement ui = instance.GetComponent <DialogueLogUIElement>();

            if (ui != null)
            {
                ui.Setup(log);
            }
        }
Пример #2
0
 public void Setup(DialogueLog.Log log)
 {
     this.text.text = log.text;
 }