// Start is called before the first frame update void Start() { voiceOverManager = GameObject.Find("Voice Over Manager"); if (levelNumber == 1) { managerLevelOne = voiceOverManager.GetComponent <voiceOverManagerLevelOne>(); } if (levelNumber == 5) { managerLevelFive = voiceOverManager.GetComponent <voiceOverManagerLevelFive>(); } player = GameObject.Find("MilesNewWorking"); }
void Start() { anim = GetComponent <Animator>(); miles = GameObject.Find("MilesNewWorking"); player = miles.GetComponent <Movement>(); for (i = 0; i < objects.Length; i++) { chestControllers[i] = objects[i].GetComponent <ChestController>(); } treasureTextMesh = treasureTextMesh.gameObject.GetComponent <TextMeshProUGUI>(); voiceHolder = GameObject.Find("Voice Over Manager"); if (levelOne) { voice = voiceHolder.GetComponent <voiceOverManagerLevelOne>(); } if (levelFive) { voice2 = voiceHolder.GetComponent <voiceOverManagerLevelFive>(); } }