Exemplo n.º 1
0
    IEnumerator printDialog(string[] text)
    {
        foreach (string text_ in text)
        {
            Debug.Log(text_);
            UI.PrintDialog(text_, 2);
            yield return(new WaitForSeconds(2.1f));
        }

        // Begin het volgende level te laden
        UI.Show_Curtain(); // Wacht todat het curtain er is
        yield return(new WaitForSeconds(1.5f));

        Application.LoadLevel("final_boss_pong");
    }
Exemplo n.º 2
0
 //Check if the player enters the elevator
 void OnTriggerStay(Collider col)
 {
     if (col.gameObject.tag == "Player" && Elevator == true && Input.GetKey(KeyCode.E) && DoorOpen)
     {
         DoorOpen = false;
         UI.Show_Curtain();
         Debug.Log("De deur gaat magisch open");
         isLoadingNextLevel = true;
         StartCoroutine(coLoadLevel(levelNaam, 1.5f));
     }
     else if (col.gameObject.tag == "Player" && Input.GetKey(KeyCode.E) && isLoadingNextLevel == false)
     {
         Debug.Log("De deur zit nog dicht");
         UI.PrintDialog("De deur zit nog dicht!", 2);
     }
 }