Example #1
0
    public void DisplayConversation(Conversation conversation, LLT.Variables.FloatVariable numPensamiento)
    {
        Scene m_Scene;

        m_Scene = SceneManager.GetActiveScene();

        if (m_Scene.name == "CeldaBlur" || m_Scene.name == "Celda")
        {
            Debug.Log("En " + m_Scene.name);
            // if (numPensamiento.Value == 0f ) return;

            currentConversationLine = conversation.ConversationLines[(int)numPensamiento.Value];
            StopAllCoroutines();
            StartCoroutine(TypeSentence(currentConversationLine.ConversationText));
            // Debug.Log("Esta es la linea de la celda " + currentConversationLine.ConversationText);
        }
        else
        {
            Debug.Log("Estoy en " + m_Scene.name);
            foreach (var conversationLine in conversation.ConversationLines)
            {
                currentConversationLine = conversationLine;
                if (currentConversationLine != null)
                {
                    StopAllCoroutines();
                    StartCoroutine(TypeSentence(currentConversationLine.ConversationText));
                    //   Debug.Log("Esta es la linea " + currentConversationLine.ConversationText);
                }
            }
        }
    }
Example #2
0
    public void StartConversation(Conversation conversation, LLT.Variables.FloatVariable numPensamiento)
    {
        // Debug.Log("StartConversation");
        dialogBox  = UnityEngine.GameObject.Find("DialogBox").GetComponent <CanvasGroup>();
        textHolder = UnityEngine.GameObject.Find("DialogText").GetComponent <Text>();
        DisplayConversation(conversation, numPensamiento);


        if (dialogBox != null && textHolder != null)
        {
            // Debug.Log("estan los elementos para la conversacion ");
            //Start displying the supplied conversation
            if (!talking)
            {
                //   Debug.Log("empiezo conversacion ");
                talking = true;
                DisplayConversation(conversation, numPensamiento);
            }
        }
    }