// abrir puerta sereta o salida secreta private void TurnLevelExitAndSecretDoor() { SecretDoor secretDoor = FindObjectOfType <SecretDoor>(); LevelExit levelExit = FindObjectOfType <LevelExit>(); if (levelExit) { // print("hay salida"); if (tortchOn >= tortchInScene.Count) { // print("aparece salida"); levelExit.ActivateLevelExit(); } else { levelExit.DeactivateLevelExit(); } } if (secretDoor) { //print("Hay secret door"); if (secretDoorTortchOn >= secretDoorTortchInScene.Count) { //print("Desaparece secret door"); secretDoor.OpenSecretDoor(); } else { secretDoor.CloseSecretDoor(); } } }
public void Init(SecretDoor secretDoor) { this.secretDoor = secretDoor; EnableAll(); secretDoorMessage.text = Localisation.Get(secretDoorMessageStringKey); EventSystem.current.SetSelectedGameObject(passCodeField.gameObject); }