add speech
This commit is contained in:
@@ -4,6 +4,9 @@ public class Talkable : Interactable
|
||||
{
|
||||
// this is a character or object that will talk upon interaction
|
||||
public Dialogue defaultDialogue;
|
||||
|
||||
// this component is optional, and also must have a non-None voice selected to work
|
||||
public DialogueVoice voice;
|
||||
public GameObject talkIndicator;
|
||||
|
||||
public Quest[] quests;
|
||||
@@ -11,6 +14,7 @@ public class Talkable : Interactable
|
||||
|
||||
public void Start()
|
||||
{
|
||||
voice = GetComponent<DialogueVoice>();
|
||||
talkIndicator.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -81,7 +85,7 @@ public override void Interact()
|
||||
if (currentDialogue == null || !currentDialogue.isActive)
|
||||
{
|
||||
DetermineDialogue();
|
||||
GameManager.Instance.DialogueManager.StartDialogue(currentDialogue);
|
||||
GameManager.Instance.DialogueManager.StartDialogue(currentDialogue, voice);
|
||||
}
|
||||
else
|
||||
GameManager.Instance.DialogueManager.DisplayNextSentence();
|
||||
|
||||
Reference in New Issue
Block a user