Ejemplo n.º 1
0
        public DialogNode(DialogNode Line)
        {
            ScriptsToFire = Line.ScriptsToFire;
            Text          = Line.Text;
            VO            = Line.VO;
            Speaker       = Line.Speaker;
            Listener      = Line.Listener;

            EditorOpen = false;
            IsCopy     = false;
            Delay      = Line.Delay;
        }
Ejemplo n.º 2
0
 public override void SetupPCLines(List <DialogNode> lines)
 {
     NPCText.gameObject.SetActive(false);
     for (int i = 0; i < lines.Count; i++)
     {
         PlayerDefaultText.text = (i + 1).ToString() + ". " + lines[i].Text;
         GameObject NewLine = Instantiate(PlayerDefaultText, new Vector2(PlayerDefaultText.transform.position.x, PlayerDefaultText.transform.position.y + i * OffsetBetweenPlayerLines), Quaternion.identity, PlayerDefaultText.transform.parent).gameObject;
         NewLine.SetActive(true);
         AllPlayerReplies.Add(NewLine);
         DialogNode node = lines[i];
         NewLine.GetComponent <Button>().onClick.AddListener(() => dspl.PlayerOptionSelected(node));
     }
 }
Ejemplo n.º 3
0
 public virtual void SetupNPCLine(DialogNode line)
 {
     if (line.Speaker.Length > 0)
     {
         NPCText.text = line.Speaker + ": ";
     }
     else
     {
         NPCText.text = "";
     }
     NPCText.text += line.Text;
     NPCText.gameObject.SetActive(true);
 }
Ejemplo n.º 4
0
        public override void SetupPCLines(List <DialogNode> lines)
        {
            Wheel.SetActive(true);
            NPCText.gameObject.SetActive(false);
            int noOfPlayerReplies = lines.Count;

            if (noOfPlayerReplies > PlayerReplies.Length)
            {
                noOfPlayerReplies = PlayerReplies.Length;
            }

            for (int i = 0; i < noOfPlayerReplies; i++)
            {
                PlayerReplies[i].text = lines[i].Text;
                PlayerReplies[i].gameObject.SetActive(true);
                DialogNode node = lines[i];
                PlayerReplies[i].GetComponent <Button>().onClick.AddListener(() => dspl.PlayerOptionSelected(node));
            }
        }
Ejemplo n.º 5
0
 public override void SetupNPCLine(DialogNode line)
 {
     ClearPlayerOptions();
     base.SetupNPCLine(line);
 }