예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     audioSource          = GetComponent <AudioSource>();
     nightmareController  = GameObject.Find("NightmareController").GetComponent <NightmareController>();
     shakeObjectOnTrigger = GameObject.Find("Player/EnemyDetector").GetComponent <ShakeObjectOnTrigger>();
     nextVolume           = 0.0f;
 }
예제 #2
0
        // 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);
        }
        // Start is called before the first frame update
        void Start()
        {
            nightmareController = GameObject.Find("NightmareController").GetComponent <NightmareController>();

            // give starting state of off, so we can keep them on in the editor?
            for (int i = 0; i < transform.childCount; i++)
            {
                transform.GetChild(i).gameObject.SetActive(false);
            }
        }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     Time.timeScale         = 1;
     audioSource            = GetComponent <AudioSource>();
     fPSController          = GetComponent <FPSController>();
     playSeriesOfAudioClips = GetComponent <PlaySeriesOfAudioClips>();
     nightmareController    = GameObject.Find("NightmareController").GetComponent <NightmareController>();
     if (!skipIntro)
     {
         StartCoroutine(Level1IntroScript());
     }
     else
     {
         firstClue.GetComponent <ClueController>().enableClue();
     }
 }
        // Start is called before the first frame update
        void Start()
        {
            flashlight       = GetComponent <Light>();
            audioSource      = GetComponent <AudioSource>();
            flashlight.color = dreamLightColor;

            if (isOn && isUseable)
            {
                flashlight.intensity = maxIntensity;
            }
            else
            {
                flashlight.intensity = 0;
            }


            nightmareController = GameObject.Find("NightmareController").GetComponent <NightmareController>();
        }