Example #1
0
 void OnValidate()
 {
     myPlayer         = FindObjectOfType <Player>();
     myPlayerMovement = FindObjectOfType <PlayerMovement>();
     myGrappleHook    = FindObjectOfType <GrappleHookBoohyah>();
     myScoreManager   = FindObjectOfType <ScoreManager>();
     myCamera         = FindObjectOfType <NewCameraMovement>();
     myLevelManager   = FindObjectOfType <LevelManager>();
 }
Example #2
0
    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;
    }