public IEnumerator DialogueInterrupt() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); string desiredSpeaker = "Voice"; string desiredDialogue = "Hello? Is this thing on? " + "Good, now that I have your " + "attention. Wait- NO!"; dlViewer.PrintDialogue(desiredSpeaker, desiredDialogue); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); string currentSpeaker = GameObject .FindWithTag("SpeakerNameText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredSpeaker, currentSpeaker); string currentDialogue = GameObject .FindWithTag("DialogueText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredDialogue, currentDialogue); yield return(new WaitForSeconds(1f)); }
public IEnumerator ShowsText() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); Cutscene currentScene = new Cutscene((cat, null)); currentScene.show(); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); string currentSpeaker = GameObject .FindWithTag("SpeakerNameText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredSpeaker, currentSpeaker); string currentDialogue = GameObject .FindWithTag("DialogueText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredDialogue, currentDialogue); }
public IEnumerator ClearsText() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); Asset kitten = new Asset("CP [Kitten]", new Vector3(0, 0), new Character(desiredSpeaker, desiredDialogue)); Cutscene currentScene = new Cutscene((kitten, null)); currentScene.show(); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); dlViewer.clearTextFields(); yield return(new WaitForSeconds(1f)); string currentSpeaker = GameObject .FindWithTag("SpeakerNameText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual("", currentSpeaker); string currentDialogue = GameObject .FindWithTag("DialogueText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual("", currentDialogue); }
public IEnumerator HidesDialoguePanel() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); dlViewer.PrintDialogue(desiredSpeaker, desiredDialogue); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); GameObject DialoguePanel = GameObject.FindWithTag("DialoguePanel"); dlViewer.hideDialoguePanel(); Assert.IsFalse(DialoguePanel.activeSelf); }
public IEnumerator HidesDialoguePanel() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); Cutscene currentScene = new Cutscene((cat, null)); currentScene.show(); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); GameObject DialoguePanel = GameObject.FindWithTag("DialoguePanel"); currentScene.hide(); Assert.IsFalse(DialoguePanel.activeSelf); }
public IEnumerator PaCToCutscene() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); Cutscene secondScene = new Cutscene((kitten, null), backgrounds[1]); PointandClick firstScene = new PointandClick(assets1, backgrounds[0]); firstScene.show(); yield return(new WaitForSeconds(2f)); firstScene.hide(); secondScene.show(); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); yield return(new WaitForSeconds(1f)); Assert.Inconclusive("Does the transition look smooth?"); }
public IEnumerator CutsceneToCutscene() { GameObject eventSystem = GameObject.FindWithTag("EventSystem"); DialogueViewer dlViewer = eventSystem.GetComponent <DialogueViewer>(); SceneNavigator sNavi = eventSystem.GetComponent <SceneNavigator>(); Cutscene secondScene = new Cutscene((cat, kitten), backgrounds[1]); Cutscene firstScene = new Cutscene((kitten, cat), backgrounds[0], secondScene); sNavi.setCurrentScene(firstScene); firstScene.show(); yield return(new WaitUntil(() => dlViewer.getNavButton().getState().isClicked())); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); yield return(new WaitForSeconds(1f)); Assert.Inconclusive("Does the transition look smooth?"); }
public IEnumerator PrintsDialogue() { DialogueViewer dlViewer = GameObject .FindWithTag("EventSystem") .GetComponent <DialogueViewer>(); dlViewer.PrintDialogue(desiredSpeaker, desiredDialogue); yield return(new WaitUntil(() => !dlViewer.getIsTyping())); string currentSpeaker = GameObject .FindWithTag("SpeakerNameText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredSpeaker, currentSpeaker); string currentDialogue = GameObject .FindWithTag("DialogueText") .GetComponent <TMPro.TextMeshProUGUI>() .text; Assert.AreEqual(desiredDialogue, currentDialogue); }