Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        // Start is called before the first frame update
        void Start()
        {
            if (resumeButton)
            {
                resumeButton.onClick.AddListener(ResumeButtonOnClick);
            }

            if (quitButton)
            {
                quitButton.onClick.AddListener(QuitButtonOnClick);
            }

            if (mouseSlider)
            {
                mouseSlider.onValueChanged.AddListener(delegate { UpdateMouseSensitivity(); });
            }

            fPSController = GameObject.Find("Player").GetComponent <FPSController>();
            //initialColor = GetComponent<Image>().color;
            initialColorOff = new Color(initialColor.r, initialColor.g, initialColor.b, 0);

            // Disable children so they aren't on the screen
            for (int i = 0; i < transform.childCount; i++)
            {
                var child = transform.GetChild(i).gameObject;
                if (child != null)
                {
                    child.SetActive(false);
                }
            }
            if (GetComponent <Image>().color != null)
            {
                GameObject.Find("[UI]/Canvas/PausePanel").GetComponent <Image>().color = initialColorOff;
            }
        }
 // Start is called before the first frame update
 void Start()
 {
     blockers.SetActive(false);
     dad.SetActive(false);
     ghost.SetActive(false);
     fPSController = GameObject.Find("Player").GetComponent <FPSController>();
     guestBedroomInfoUI.SetActive(false);
 }
        // Start is called before the first frame update
        void Start()
        {
            dadGoodbyeAudioSource = GetComponent <AudioSource>();
            fPSController         = GameObject.Find("Player").GetComponent <FPSController>();
            level1ExitWinScreen   = GameObject.Find("Level1Controllers/ExitWinScreen").GetComponent <Level1ExitWinScreen>();

            exitDoor1.GetComponent <DoorController>().DisableDoor();
            exitDoor2.GetComponent <DoorController>().DisableDoor();
        }
Ejemplo n.º 5
0
        // Start is called before the first frame update
        void Start()
        {
            audioSource   = GetComponent <AudioSource>();
            fPSController = GameObject.Find("Player").GetComponent <FPSController>();
            exitCollider  = GetComponent <BoxCollider>();
            childRender   = GetComponentInChildren <Renderer>();
            GameObject.Find("[UI]/Canvas4/GameCredits").SetActive(false);
            backgroundMusicController = GameObject.Find("Player/BGMusic").GetComponent <BackgroundMusicController>();

            childRender.enabled  = false;
            exitCollider.enabled = false;
        }
        // Start is called before the first frame update
        void Start()
        {
            finalFightAudioSource = finalFightAudio.GetComponent <AudioSource>();
            fPSController         = GameObject.Find("Player").GetComponent <FPSController>();
            fightLight            = GetComponentInChildren <Light>();

            entranceDoor1.GetComponent <DoorController>().EnableDoor();
            if (!entranceDoor1.GetComponent <DoorController>().isOpen)
            {
                entranceDoor1.GetComponent <DoorController>().Use();
            }

            nextScene.SetActive(false);
            enemy.SetActive(false);
            fightLight.enabled = false;
        }
Ejemplo n.º 7
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()
        {
            if (deathScreams.Length == 0)
            {
                Debug.Log("Warning there are no death screams set!");
            }
            if (spawnTalks.Length == 0)
            {
                Debug.Log("Warning there are no death talks set!");
            }
            audioSource = GetComponent <AudioSource>();

            fPSController = GetComponent <FPSController>();
            //GameObject.Find("[UI]/Canvas2/BlackoutPanel").GetComponent<Image>().color = new Color(0, 0, 0, 0);
            enemiesHolder = GameObject.Find("[Enemies]");

            canDieTime = Time.time + minTimeToDie;
        }