void OnValidate() { myPlayer = FindObjectOfType <Player>(); myPlayerMovement = FindObjectOfType <PlayerMovement>(); myGrappleHook = FindObjectOfType <GrappleHookBoohyah>(); myScoreManager = FindObjectOfType <ScoreManager>(); myCamera = FindObjectOfType <NewCameraMovement>(); myLevelManager = FindObjectOfType <LevelManager>(); }
private void OnValidate() { myPlayer = FindObjectOfType <Player>(); myPlayerMovement = FindObjectOfType <PlayerMovement>(); myGrappleHook = FindObjectOfType <GrappleHookBoohyah>(); myScoreManager = FindObjectOfType <ScoreManager>(); myLevelLoader = FindObjectOfType <LeverLoader>(); myPlayerPosition = myPlayerMovement.transform.position; myCameraMovement = FindObjectOfType <NewCameraMovement>(); myCameraPosition = myCameraMovement.transform.position; }