TalkTo() public method

Begins a conversation if possible
public TalkTo ( ) : bool
return bool
Example #1
0
    public IEnumerator AttendAppointment(NPC actor)
    {
        //make the npc stop listen to the movement of the next npc it wants to talk to and start listening to the next
        if (conversationPartner != null)
        {
            conversationPartner.OnPositionChange -= actor.UpdateDistance;
        }

        Appointment next = actor.appointments.GetNext();

        if (next != null)
        {
            if (next.conversation != null)
            {
                actor.appointments.GetNext().conversationPartner.OnPositionChange += actor.UpdateDistance;
            }
        }


        if (place != null)
        {
            yield return(actor.StartCoroutine(actor.GoTo(place())));
        }
        if (conversation != null)
        {
            yield return(actor.StartCoroutine(actor.TalkTo(conversationPartner, conversation)));
        }
    }