// Use this for initialization void Start() { audioHandler = GameObject.Find("AudioHandler").GetComponent <AudioHandlerScript>(); glow = GameObject.Find("EndGlow").GetComponent <ParticleSystem>(); //Set the fadingAlpha to 1 so that things will fade correctly fadingAlpha = 1; //Find the final level script finalLevelCutscene = GameObject.Find("HallwayRoom1").GetComponent <FinalLevelCutscene> (); //Find the basement room basementRoom = GameObject.Find("EndingBasement"); //Find the silhouette //silhouette = GameObject.Find ("tempSilhouette"); //Find the hunter monster //hunterEnemy = GameObject.FindGameObjectWithTag ("HunterEnemy"); hunterFog = GameObject.Find("FogLeft"); //Get the spotlight for the hunter monster spotlight = GameObject.Find("hunter_spotlight_test_1"); //Make the silhouette invisible //silhouette.GetComponent<Renderer> ().material.color = Color.clear; //Make it inactive until the ending cutscene starts //silhouette.SetActive (false); //find the player player = GameObject.FindGameObjectWithTag("Player"); clickPosition = new Vector2(0f, 0f); }
//GameObject retryButton; //GameObject menuButton; //GameObject spottedCue; // Use this for initialization void Start() { Time.timeScale = 1f; // spottedCue = GameObject.Find("SpottedIndicator"); // spottedCue.SetActive(false); player = GameObject.FindWithTag("Player"); playerScript = player.GetComponent <PlayerControl> (); audioHandler = GameObject.Find("AudioHandler").GetComponent <AudioHandlerScript>(); // set the initial position of the player initialPlayerPos = player.transform.position; //only store this if the player is on level 1, 2, or 3 if (Application.loadedLevel >= 3 && Application.loadedLevel <= 5) { openCutscene = GameObject.Find("Cutscene").GetComponent <OpeningCutscene>(); } //only store if final level else if (Application.loadedLevel == 6) { endCutscene = GameObject.Find("HallwayRoom1").GetComponent <FinalLevelCutscene>(); } gameOverPanel = GameObject.Find("GameOverPanel"); //retryButton = GameObject.Find("RetryButton"); //menuButton = GameObject.Find("MenuButton"); gameOverPanel.SetActive(false); overlay.SetActive(false); overlay_image = overlay.GetComponent <Image>(); //play music clip #3 (intro music) /* * audioHandler.LoopMusic(false); * audioHandler.PlayMusic(3); */ //start level music at certain time //StartCoroutine("levelMusic"); }
//GameObject retryButton; //GameObject menuButton; //GameObject spottedCue; // Use this for initialization void Start() { Time.timeScale = 1f; // spottedCue = GameObject.Find("SpottedIndicator"); // spottedCue.SetActive(false); player = GameObject.FindWithTag("Player"); playerScript = player.GetComponent<PlayerControl> (); audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandlerScript>(); // set the initial position of the player initialPlayerPos = player.transform.position; //only store this if the player is on level 1, 2, or 3 if (Application.loadedLevel >= 3 && Application.loadedLevel <= 5) { openCutscene = GameObject.Find("Cutscene").GetComponent<OpeningCutscene>(); } //only store if final level else if(Application.loadedLevel == 6) { endCutscene = GameObject.Find("HallwayRoom1").GetComponent<FinalLevelCutscene>(); } gameOverPanel = GameObject.Find("GameOverPanel"); //retryButton = GameObject.Find("RetryButton"); //menuButton = GameObject.Find("MenuButton"); gameOverPanel.SetActive(false); overlay.SetActive(false); overlay_image = overlay.GetComponent<Image>(); //play music clip #3 (intro music) /* audioHandler.LoopMusic(false); audioHandler.PlayMusic(3); */ //start level music at certain time //StartCoroutine("levelMusic"); }
// Use this for initialization void Start() { audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandlerScript>(); glow = GameObject.Find("EndGlow").GetComponent<ParticleSystem>(); //Set the fadingAlpha to 1 so that things will fade correctly fadingAlpha = 1; //Find the final level script finalLevelCutscene = GameObject.Find ("HallwayRoom1").GetComponent<FinalLevelCutscene> (); //Find the basement room basementRoom = GameObject.Find ("EndingBasement"); //Find the silhouette //silhouette = GameObject.Find ("tempSilhouette"); //Find the hunter monster //hunterEnemy = GameObject.FindGameObjectWithTag ("HunterEnemy"); hunterFog = GameObject.Find("FogLeft"); //Get the spotlight for the hunter monster spotlight = GameObject.Find ("hunter_spotlight_test_1"); //Make the silhouette invisible //silhouette.GetComponent<Renderer> ().material.color = Color.clear; //Make it inactive until the ending cutscene starts //silhouette.SetActive (false); //find the player player = GameObject.FindGameObjectWithTag ("Player"); clickPosition = new Vector2(0f, 0f); }