Skip to content
Snippets Groups Projects
Commit ea11523f authored by mikeleo03's avatar mikeleo03
Browse files

feat : handle cut-scene handler before scene starts

parent 781a6a06
1 merge request!7Add dialog cut-scenes
......@@ -16,6 +16,7 @@ public class DialogueManager : MonoBehaviour
// Start is called before the first frame update
void Start()
{
Time.timeScale = 0;
textComponent.text = string.Empty;
talkerComponent.text = string.Empty;
StartDialogue();
......@@ -51,7 +52,7 @@ public class DialogueManager : MonoBehaviour
foreach (char c in lines[index].ToCharArray())
{
textComponent.text += c;
yield return new WaitForSeconds(textSpeed);
yield return new WaitForSecondsRealtime(textSpeed);
}
}
......@@ -67,6 +68,7 @@ public class DialogueManager : MonoBehaviour
else
{
gameObject.SetActive(false);
Time.timeScale = 1;
}
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment