// Use this for initialization void Start() { player = GameObject.FindWithTag("Player"); playerScript = player.GetComponent <youController>(); me = gameObject; myAudioSource = GetComponent <AudioSource>(); myAudioSource.clip = mySound; }
// Use this for initialization void Start() { myAudioSource = GetComponent <AudioSource>(); myAudioSource.clip = mySound; mySpriteRenderer = GetComponent <SpriteRenderer>(); doorScript = GameObject.FindWithTag("Door").GetComponent <doorController>(); youScript = GameObject.FindWithTag("Player").GetComponent <youController>(); mySpriteRenderer.color = doorScript.CurrentColorPalette[1]; }
// Use this for initialization void Start() { myAudioSource = GetComponent <AudioSource>(); myAudioSource.clip = mySound; mySpriteRenderer = GetComponent <SpriteRenderer>(); myTextMesh = GetComponentInChildren <TextMesh>(); doorScript = GameObject.FindWithTag("Door").GetComponent <doorController>(); youScript = GameObject.FindWithTag("Player").GetComponent <youController>(); backdropScript = GameObject.Find("backdrop").GetComponent <backdropController>(); int myDisplayNumber = myNumber + 1; myTextMesh.text = myDisplayNumber + ""; squareNumberController myNumberDisplayController = myNumberDisplay.GetComponent <squareNumberController>(); myNumberDisplayController.mySpriteRenderer.sprite = numbers[myNumber]; }
// Use this for initialization void Start() { ourBPM = 90f; beatTimer = ourBPM / 60f; currentBeat = 1; fakeRoomCamera.aspect = 1.3333f; //We start on the first level, currentLevel = 1; //Which is at this position on the map array mapPosition[0] = 2; mapPosition[1] = 2; doorOpen = musicBits[musicBits.Length - 1]; myAudioSource = GetComponent <AudioSource>(); myAudioSource.clip = doorOpen; doorOpenPlayed = false; mainDoorOpened = new bool[17]; secretDoorOpened = new bool[2]; //13 is the dead end so the go back door is just the normal door mainDoorOpened[13] = true; mySpriteRenderer = GetComponent <SpriteRenderer>(); //myTextMesh = GetComponentInChildren<TextMesh>(); smallDoorScript = smallDoor.GetComponent <smallDoorController>(); mapScript = GameObject.Find("map").GetComponent <mapController>(); youScript = GameObject.FindWithTag("Player").GetComponent <youController>(); pauseMenu = false; newLevel(); }