コード例 #1
0
ファイル: TextTrigger.cs プロジェクト: jh318/PlatformerDMI
 void OnTriggerEnter2D(Collider2D c)
 {
     if (c.gameObject.GetComponent <PlayerController>())
     {
         //TextController.gameObject.SetActive(true);
         TextController.TypeText("B to interact!");
         TextController.WaitForInput();
         TextController.ClearText();
         TextController.TypeText("X to Launch!");
         TextController.WaitForInput();
         TextController.ClearText();
         TextController.TypeText("Down to Interact with stuff! (Like Doors)");
         TextController.WaitForInput();
         TextController.ClearText();
         gameObject.SetActive(false);
     }
 }
コード例 #2
0
    IEnumerator BossIntroCutscene()
    {
        yield return(new WaitForEndOfFrame());

        UIManager.instance.textBox.SetActive(true);
        TextController.TypeText("Muhuahahaha~~!");
        TextController.WaitForInput();
        TextController.ClearText();
        TextController.TypeText("MUHUAHAHAHAAH~~!!");
        TextController.WaitForInput();
        TextController.ClearText();
        while (TextController.queueSize > 0)
        {
            yield return(new WaitForEndOfFrame());
        }
        bossPlatform.SetActive(false);
    }