// Start is called before the first frame update void Start() { spectreRenderer = GetComponentInChildren <Renderer>(); clueCamera = GameObject.Find("Player/ClueCamera").GetComponent <CameraTracker>(); spectreRenderer.enabled = false; }
// Start is called before the first frame update void Start() { nightmareController = GameObject.Find("NightmareController").GetComponent <NightmareController>(); fPSController = GameObject.Find("Player").GetComponent <FPSController>(); flashlight = GameObject.Find("Player/MainCamera/Flashlight").GetComponent <FlashlightController>(); spectreVisionController = GameObject.Find("Player/ClueCamera/SpectrePopup").GetComponent <SpectreVisionController>(); backgroundMusicController = GameObject.Find("Player/BGMusic").GetComponent <BackgroundMusicController>(); clueCameraTracker = GameObject.Find("Player/ClueCamera").GetComponent <CameraTracker>(); audioSource = GetComponent <AudioSource>(); playSeriesOfAudioClips = GetComponent <PlaySeriesOfAudioClips>(); //if (spawnsEnemy) // enemy.SetActive(false); nightmareTriggerDelay = 0.0f; for (int i = 0; i < audioClipsBeforeTrigger; i++) { nightmareTriggerDelay += playSeriesOfAudioClips.GetClipLength(i); } if (nightmareTriggerDelay != 0) { Debug.Log("Nightmare triggers with " + nightmareTriggerDelay + " s delay."); } //Disable final scene trigger at startup if (enablesClue) { StartCoroutine(DisableNextClue()); } //Debug.Log("Started up " + gameObject.name); }