Converse() public method

public Converse ( Conversation, conversation ) : void
conversation Conversation,
return void
Esempio n. 1
0
    void OnTriggerEnter(Collider collider)
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (collider.gameObject != player)
        {
            return;
        }

        // TODO: Need to freeze the player


        // Initialize a conversation if one hasn't started yet
        if (!talked)
        {
            talked = true;
            convo  = new GraphConversation(convo_file);
        }

        ConversationDisplayer c = GameObject.Find("ConversationDisplayer").GetComponent(typeof(ConversationDisplayer)) as ConversationDisplayer;

        // TODO: Need to determine if the action was completed

        // Begin the conversation displayer
        c.Converse(convo);
    }
Esempio n. 2
0
    void OnTriggerExit(Collider collider)
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (collider.gameObject != player)
        {
            return;
        }

        ConversationDisplayer c = GameObject.Find("ConversationDisplayer").GetComponent(typeof(ConversationDisplayer)) as ConversationDisplayer;

        // Set the conversation to the proper return point
        convo.resetConversation();

        // End the conversation displayer
        c.Converse(null);
    }
Esempio n. 3
0
    IEnumerator turnToFaceAndTalk()
    {
        //Does an sudden, jumpy turn which actually looks okayish.  But this method is called as a
        // coroutine in order to facilitate a smoother turn if we want to implement that.

        transform.LookAt(GameObject.FindGameObjectWithTag("Player").transform);

        yield return(new WaitForSeconds(0.2f));

        ConversationDisplayer c = GameObject.Find("ConversationDisplayer").GetComponent(typeof(ConversationDisplayer)) as ConversationDisplayer;

        Time.timeScale = 0;
        if (currentQuest < questList.Length && questList[currentQuest].checkIfCompleted())
        {
            currentQuest++;
        }

        TraceLogger.LogKVtime("conversation", name + ", " + transform.position);

        c.Converse(((Conversation)conversationList[currentQuest]));

        c.show(GameObject.Find("Inventory"));
    }