Ejemplo n.º 1
0
    public void Open(string[] links, string[] text, System.Action <string> onComplete)
    {
        if (!string.IsNullOrEmpty(links[0]) && string.IsNullOrEmpty(text[0]))
        {
            onComplete.Invoke(links[0]);
            return;
        }

        Open("bring_in");
        TransformUtil.DestroyChildren(_content);

        for (int i = 0; i < links.Length; i++)
        {
            DialogueOption option = Instantiate(_itemPrefab, _content, false);
            option.Set(i, text[i], links[i]);
        }
        OnChoiceMade += onComplete;
    }