Beispiel #1
0
 // Update is called once per frame
 void OnTriggerEnter(Collider other)
 {
     if (!done && !locked && other.gameObject.CompareTag("Player"))
     {
         StartPuzzle();
         MagicWall.SetActive(true);
         MagicWall.GetComponent <Animator> ().SetTrigger("Start");
         gameManager.Roomtype = RoomType;
         gameManager.WritePuzzleStart();
         locked = true;
         camController.ActivatePuzzleCam(transform);
         PlayerDamagable playerDamagableScript = other.gameObject.GetComponentInChildren <PlayerDamagable>();
         playerDamagableScript.saveRespawnPosition();
     }
 }
Beispiel #2
0
 ///***  Function
 ///  Associated to the EMP Bar
 #region <-- TOP
 private void Awake()
 {
     playerDamagable = GetComponentInParent <PlayerDamagable>();
 }