예제 #1
0
 /// <summary>
 /// Initiates the input dialogue prefab. Makes DialogueHolder child of self
 /// whose GameObject is a canvas.
 /// </summary>
 /// <param name="dialogueHolderObject">
 /// The GameObject containing the DialougeHolder and related DialogueLines.
 /// </param>
 private void InitDialogue(GameObject dialoguePrefab)
 {
     _currentDialogueHolderObject = GameObject.Instantiate(dialoguePrefab);
     _currentDialogueHolder       = _currentDialogueHolderObject.GetComponent <DialogueHolder>();
     _currentDialogueHolderObject.gameObject.transform.SetParent(transform);
     _currentDialogueHolderObject.SetActive(true);
 }
예제 #2
0
 /// <summary>
 /// Deactivates the dialogue sequence. Resets/Deactivates the
 /// DialogueHolder.
 /// </summary>
 public void DeactivateDialogue()
 {
     GameManager.Instance.ToggleDialogue(null);
     Destroy(_currentDialogueHolderObject);
     _currentDialogueHolderObject = null;
     _currentDialogueHolder       = null;
 }