Esempio n. 1
0
    public DialogueActionPanel preset(UnityEvent action, DialogueController controller, Color color, Color textColor, string text)
    {
        DialogueActionPanel panel = Instantiate(this, Vector3.zero, Quaternion.identity, controller.transform);

        panel.gameObject.SetActive(false);
        controller.Attach(panel);

        panel.next.onClick.AddListener(delegate
        {
            controller.Discard(panel);
            action.Invoke();
        });
        panel.cancel.onClick.AddListener(delegate
        {
            controller.Cancel();
        });
        panel.textArea.text  = text;
        panel.textArea.color = textColor;
        Image[] images = panel.GetComponentsInChildren <Image>(true);
        foreach (Image i in images)
        {
            i.material.color = color;
        }
        return(panel);
    }
Esempio n. 2
0
 public abstract DialoguePanel createSubtree(DialogueController controller, Color color, Color textColor, DialogueNextPanel dnp, DialogueSplitPanel dsp, DialogueActionPanel dap);
Esempio n. 3
0
    public override DialoguePanel createSubtree(DialogueController controller, Color color, Color textColor, DialogueNextPanel dnp, DialogueSplitPanel dsp, DialogueActionPanel dap)
    {
        DialoguePanel panel = nextNode.createSubtree(controller, color, textColor, dnp, dsp, dap);

        return(dnp.preset(panel, controller, color, textColor, text));
    }
Esempio n. 4
0
    public override DialoguePanel createSubtree(DialogueController controller, Color color, Color textColor, DialogueNextPanel dnp, DialogueSplitPanel dsp, DialogueActionPanel dap)
    {
        DialoguePanel optionAPanel = optionA.createSubtree(controller, color, textColor, dnp, dsp, dap);
        DialoguePanel optionBPanel = optionB.createSubtree(controller, color, textColor, dnp, dsp, dap);

        return(dsp.preset(optionAPanel, optionBPanel, controller, color, textColor, text, optionAText, optionBText));
    }
Esempio n. 5
0
 public override DialoguePanel createSubtree(DialogueController controller, Color color, Color textColor, DialogueNextPanel dnp, DialogueSplitPanel dsp, DialogueActionPanel dap)
 {
     return(dap.preset(action, controller, color, textColor, text));
 }