Example #1
0
    //ALWAYS Disable() beforehand.
    public IEnumerator ForceSpeechToPlayer(string[] toSay)
    {
        Disable();
        dialogueForPlayer  = toSay;
        speechBubbleActive = true;
        yield return(StartCoroutine(mainSpeechControl.SaySomething(playerIcon, GetComponent <NPCBaseScript> ().npcName, toSay)));

        ClearSpeechBubble();
    }
Example #2
0
    //Makes a call to SpeechControl on the UI with the arguments that determine what to say and the icon that is saying it.
    private IEnumerator SpeakToPlayer(string[] toSay, string name)
    {
        dialogueForPlayer  = toSay;
        speechBubbleActive = true;
        yield return(StartCoroutine(mainSpeechControl.SaySomething(playerIcon, name, toSay)));

        //Do whatever action should be done for the NPC that is attached.
        GetComponent <NPCBaseScript> ().NPCActionAfterSpeaking();
    }