Exemplo n.º 1
0
    public void NextSentence()
    {
        curentSentence++;

        //Passer à la phrase suivante si il y an a encore
        if (curentNode.dialogues[curentDialogue].Sentences.Length > curentSentence)
        {
            UpdateTextField();
        }

        //Passer au narrateur si il y an a encore
        else
        {
            curentSentence = 0;
            curentDialogue++;

            if (curentNode.dialogues.Length > curentDialogue)
            {
                UpdateTextField();
            }

            else
            {
                if (curentNode.nextNodes.Length == 1)
                {
                    NextNode(0);
                }
                else if (curentNode.kigurumiChoice)
                {
                    kigurumis.GetComponent <Canvas>().enabled = true;
                }
                else
                {
                    uiHandler.EnableOptions(curentNode.options[0], curentNode.options[1]);
                }
            }
        }
    }