Esempio n. 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.transform.tag == "Player" && GameMasterController.instance.IsInputEnabled)
     {
         if (!isDone)
         {
             //Debug.Log("Da hell?");
             levelController = GameObject.Find("LevelController").GetComponent <LevelControllerScript>();
             GameMasterController.instance.setLastDoorID(id);
             if (dir == Direction.down)
             {
                 levelController.toLowerLevel();
             }
             else
             {
                 levelController.toHigherLevel();
             }
             levelController.toNextLevel();
         }
     }
 }