public void ChangePosition() { for (int i = 0; i < dialoguePortraitList.Count; i++) { dialoguePortraitList[i].parent.SetActive(false); if (dialogueOBJ.portraitPosition == PortraitPosition.Left) { dialoguePortraitCur = dialoguePortraitList[0]; } if (dialogueOBJ.portraitPosition == PortraitPosition.Right) { dialoguePortraitCur = dialoguePortraitList[1]; } } dialoguePortraitCur.parent.SetActive(true); }
private DialogueLine ConvertLine(string line) { string[] arr = line.Split(':'); string words = arr[1]; string[] first = arr[0].Split(' '); string name = first[0]; if (name.Equals("Narrator")) { return(new DialogueLine(null, words)); } if (first.Length == 1) { return(new DialogueLine(GameInformation.instance.GetPlayerInfo(name), words)); } DialoguePortrait portrait = ConvertToPortrait(first[1]); return(new DialogueLine(GameInformation.instance.GetPlayerInfo(name), portrait, words)); }
public DialogueLine(PlayerUnitInfo info, DialoguePortrait portrait, string sentence) : this(info, sentence) { this.portrait = portrait; }