Example #1
0
    public void OnAskButtonClick(Advisor.Reply reply)
    {
        if (!string.IsNullOrEmpty(reply.url))
        {
            SG_Utils.OpenLink(reply.url, reply.name);

            Reset(reply.name);
            if (!string.IsNullOrEmpty(reply.answer))
            {
                ReplyBubbleShow(reply.answer);
            }
        }
        else if (!string.IsNullOrEmpty(reply.email))
        {
            // Utils.Email(reply.email, reply.subject, reply.body);

            ui.options.SendEmail();

            Reset(reply.name);
            if (!string.IsNullOrEmpty(reply.answer))
            {
                ReplyBubbleShow(reply.answer);
            }
        }
        else
        {
            Ask(reply.name);
        }
    }
Example #2
0
    public AskButton Copy(Advisor.Reply reply)
    {
        var instance = Instantiate(this);

        instance.transform.SetParent(this.transform.parent, false);
        instance.Setup(reply);
        return(instance);
    }
Example #3
0
    public void Setup(Advisor.Reply reply)
    {
        this.reply = reply;

        mainText.text = reply.name;

        gameObject.SetActive(true);
    }