예제 #1
0
    //[SerializeField] GameObject Player;

    void Start()
    {
        fadeInUI  = gameObject.GetComponent <FadeInUI>();
        fadeOutUI = gameObject.GetComponent <FadeOutUI>();
        if (DebugMode)
        {
            Dialog = TestDialog;
        }
        //Player = GameObject.FindGameObjectWithTag("Player");
    }
예제 #2
0
 public void StartDialog(DialogsScriptableObject dialogScriptableObject)
 {
     //Player.GetComponent<PlayerBehavior>().enabled = false;
     StopAllCoroutines();
     nextSentenceActive = true;
     DialogButton.SetActive(nextSentenceActive);
     Dialog = dialogScriptableObject;
     Debug.Log(Dialog.textDialog);
     fadeInUI.StartFadeingUI();
     StartCoroutine(TypeSentence(Dialog.textDialog));
 }
예제 #3
0
 public void DisplayNextSentence()
 {
     if (Dialog.EndScene == true)
     {
         if (Dialog.nextSentences != null)
         {
             Dialog = Dialog.nextSentences;
         }
         EndDialog();
         return;
     }
     else
     {
         Dialog = Dialog.nextSentences;
         StopAllCoroutines();
         StartCoroutine(TypeSentence(Dialog.textDialog));
     }
 }