Esempio n. 1
0
 //check if the level has been completed, if so, the final door opens
 void LevelComplete()
 {
     if (GameObject.Find("Tiles"))
     {
         if (thingys.Count() == 3 && enemies.transform.childCount == 0 && completed == false && GameObject.Find("Tiles").GetComponent <DoorPuzzle>().Finished())
         {
             completed = true;
             finalDoor.OpenDoor();
         }
     }
     else
     {
         if (thingys.Count() == 3 && enemies.transform.childCount == 0 && completed == false)
         {
             completed = true;
             finalDoor.OpenDoor();
         }
     }
 }
Esempio n. 2
0
    //the evil  character opens a chatbox and explains himself
    private IEnumerator EvilTalk()
    {
        chatBox.ShowChat("CoolerYou", "You! with the face!, I'm running out of thingys and I need you to collect some more for me", true);
        chatBox.NoDismiss(true);
        yield return(new WaitForSeconds(9f));

        chatBox.ClearChat();
        chatBox.WriteChat("I would do it myself but I don't feel like it, so this paradox and the universe depend on you.");
        yield return(new WaitForSeconds(9f));

        chatBox.HideChat();
        //evil character disappears
        playerEvil.transform.GetChild(6).gameObject.SetActive(false);
        playerEvil.transform.GetChild(6).gameObject.SetActive(true);
        playerEvil.transform.GetChild(0).gameObject.SetActive(false);
        playerEvil.transform.GetChild(1).gameObject.SetActive(false);
        playerEvil.transform.GetChild(2).gameObject.SetActive(false);
        playerEvilEntrance.Play();
        finalDoor.OpenDoor();
        yield return(new WaitForSeconds(4f));

        gone = true;
    }