void Awake() { if (timer == null) { timer = FindObjectOfType <LevelTimer>(); } player = GetComponentInChildren <Player>(); foreach (Transform t in transform) { if (t.gameObject.CompareTag("Entry")) { entry = t; break; } } rotation = GetComponent <RotateWorld>(); teleports = GetComponentsInChildren <Teleport>(); shrinkingTiles = GetComponentsInChildren <ShrinkGrowOverTime>(); }
/// <summary> /// Initializes each variable that depend on the lockInteraction, RotateWorld, Interact and Glitch Effect /// </summary> private void InitilializeReferences() { interactingwith = GetComponent <InteractCamSwitch>(); rotate = GetComponent <RotateWorld>(); interact = GetComponent <LockInteract>(); }