// Start is called before the first frame update private void Start() { // Initialize element playerCamera = gameObject.GetComponentInChildren <Camera>(); magnifyingGlass = gameObject.GetComponentInChildren <MagnifyingGlassManager>(); fadeController = FindObjectOfType <FadeController>(); campfire = FindObjectOfType <Flicker>(); }
void Start() { rb = GetComponent <Rigidbody>(); camTF = Camera.main.transform; camStandHeight = camTF.localPosition.y; standingSpeed = speed; crouchingSpeed = speed * 0.5f; magnifyingGlass = GetComponentInChildren <MagnifyingGlassManager>(); Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; fadeController = FindObjectOfType <FadeController>(); fadeController.SetTransparent(); }