Example #1
0
 // Use this for initialization
 void Start()
 {
     audioManager  = audio.GetComponent <NeurosisAudioManager> ();
     cameraCollide = cameraCol.GetComponent <CameraCollide>();
     paperPickUp   = pickUp.GetComponent <PaperPickUp> ();
     fogOn         = false;
     //cassette = (PaperPickUp)GameObject.Find("Room 0 Cassette").GetComponent("PaperPickUp");
     //cassetteplayer = (PaperPickUp)GameObject.Find ("cassetteplayer_model").GetComponent("PaperPickUp");
     doorLock.SetActive(false);
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     tapeOneLoc   = Random.Range(1, 4);
     tapeTwoLoc   = Random.Range(1, 4);
     tapeThreeLoc = Random.Range(1, 4);
     //	setting the audioManager to type NeurosisAudioManager
     audioManager = audio.GetComponent <NeurosisAudioManager> ();
     //	setting the cameraCollide to type CameraCollide
     cameraCollide = appear.GetComponent <CameraCollide> ();
     audioManager.SetVolume(11, 0.0f);
     opener           = door.GetComponent <firstDoorToOpen>();
     tapePlayerPickup = tapePlayer.GetComponent <PaperPickUp>();
     tapePickup       = firstTape.GetComponent <PaperPickUp> ();
     tapePickUp2      = secondTape.GetComponent <PaperPickUp> ();
     tapePickUp3      = thirdTape.GetComponent <PaperPickUp> ();
     tapePickUp4      = fourthTape.GetComponent <PaperPickUp> ();
     firstdoor        = firstDoor.GetComponent <firstDoorToOpen> ();
     //pickPaper2 = paper2.GetComponent<Room1PickUp>();
     audioManager.SetPriority(11, 0);
 }
Example #3
0
    // Start is called before the first frame update
    void Start()
    {
        //door = GameObject.FindGameObjectWithTag("EndDoor").transform;
        //door.GetComponent<Animator>().speed = 0;
        spawnLocations.AddRange(GameObject.FindGameObjectsWithTag("PaperSpawn"));

        for (int i = 0; i < papersToSpawn; i++)
        {
            int rand = Random.Range(0, spawnLocations.Count);

            GameObject paper  = Instantiate(paperPref, spawnLocations[rand].transform.position, Quaternion.identity);
            Material   newMat = new Material(mat);
            newMat.mainTexture = textures[i];
            paper.GetComponent <MeshRenderer>().material = newMat;
            PaperPickUp pickUp = paper.GetComponentInChildren <PaperPickUp>();
            pickUp.spawner     = GetComponent <PaperSpawner>();
            pickUp.PaperSprite = sprites[i];
            pickUp.Id          = i + 1;
            papers.Add(paper);
            spawnLocations.RemoveAt(rand);
        }
    }
Example #4
0
 // Use this for initialization
 void Start()
 {
     opener = door.GetComponent<firstDoorToOpen>();
     pickPaper = paper.GetComponent<PaperPickUp>();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     tapeOneLoc = Random.Range (1, 4);
     tapeTwoLoc = Random.Range (1, 4);
     tapeThreeLoc = Random.Range (1, 4);
     //	setting the audioManager to type NeurosisAudioManager
     audioManager = audio.GetComponent<NeurosisAudioManager> ();
     //	setting the cameraCollide to type CameraCollide
     cameraCollide = appear.GetComponent<CameraCollide> ();
     audioManager.SetVolume (11, 0.0f);
     opener = door.GetComponent<firstDoorToOpen>();
     tapePlayerPickup = tapePlayer.GetComponent<PaperPickUp>();
     tapePickup = firstTape.GetComponent<PaperPickUp> ();
     tapePickUp2 = secondTape.GetComponent<PaperPickUp> ();
     tapePickUp3 = thirdTape.GetComponent<PaperPickUp> ();
     tapePickUp4 = fourthTape.GetComponent<PaperPickUp> ();
     firstdoor = firstDoor.GetComponent<firstDoorToOpen> ();
     //pickPaper2 = paper2.GetComponent<Room1PickUp>();
     audioManager.SetPriority (11, 0);
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     audioManager = audio.GetComponent<NeurosisAudioManager> ();
     cameraCollide = cameraCol.GetComponent<CameraCollide>();
     paperPickUp = pickUp.GetComponent<PaperPickUp> ();
     fogOn = false;
     //cassette = (PaperPickUp)GameObject.Find("Room 0 Cassette").GetComponent("PaperPickUp");
     //cassetteplayer = (PaperPickUp)GameObject.Find ("cassetteplayer_model").GetComponent("PaperPickUp");
     doorLock.SetActive (false);
 }
Example #7
0
 // Use this for initialization
 void Start()
 {
     opener    = door.GetComponent <firstDoorToOpen>();
     pickPaper = paper.GetComponent <PaperPickUp>();
 }