Exemplo n.º 1
0
    public void NextDialouge()
    {
        if (isProjectDailogue)
        {
            if (countDialouge < maxDialouge)
            {
                _description.text = dialogues[countDialouge].GetTextDialogue();
                countDialouge++;
            }
            else
            {
                _switchScene.DisplayDialouge(false);
            }
        }
        else
        {
            if (countDialouge < maxDialouge)
            {
                _description.text = dialogues[countDialouge].GetTextDialogue();
                countDialouge++;
            }
            else
            {
                if (_currentDialoguesNPC_Template.Condition_event == CreateEvent.CreateIdea)
                {
                    ideasId = _currentDialoguesNPC_Template.IdeaId;
                    if (_ideasController.ReceiveIdea(ideasId))
                    {
                        string ideaName = _ideasController.Ideas_DataHandler.GetIdeasDic[ideasId].IdeaName;
                        Sprite ideaIcon = _ideasController.Ideas_DataHandler.GetIdeasDic[ideasId].Icon;
                        CreateIdea(ideaName, ideaIcon);
                    }
                }

                _switchScene.DisplayDialouge(false);
            }
        }
    }