How to access other classes from the Mouse Look Script
<p>Can you help me access variables from other classes from the Mouse Look Script because I cant seem to seem to reference other classes (mainly the ones I created).</p>

<p>Any help would be appreciated.</p>

<pre><code>    private Quaternion m_CharacterTargetRot;
    private Quaternion m_CameraTargetRot;
    private bool m_cursorIsLocked = true;
    private int LeftCounter ;
    private int RightCounter;

    public void Init(Transform character, Transform camera)
    {
        m_CharacterTargetRot = character.localRotation;
        m_CameraTargetRot = camera.localRotation;
    }

    public void LookRotation(Transform character, Transform camera)
    {
        float yRot = CrossPlatformInputManager.GetAxis("Mouse X") * XSensitivity;
        float xRot = CrossPlatformInputManager.GetAxis("Mouse Y") * YSensitivity;

        m_CharacterTargetRot *= Quaternion.Euler (0f, yRot, 0f);
        m_CameraTargetRot *= Quaternion.Euler (-xRot, 0f, 0f);


    //  Declaring focused rotations
        Vector3 CharToTar = target.position - character.position;
        Quaternion CharRotate = Quaternion.LookRotation (CharToTar);


        if (WitchRotation) {
            if (LeftCounter &gt;= 50) {
                LeftCounter = 0;
                Debug.Log ("Witch Stare");

                m_CharacterTargetRot = CharRotate;
                m_CameraTargetRot *= Quaternion.Euler (-xRot, 0f, 0f);

            }
            character.rotation = m_CharacterTargetRot;
            camera.localRotation = m_CameraTargetRot;

        } else {
            if (clampVerticalRotation)
                m_CameraTargetRot = ClampRotationAroundXAxis (m_CameraTargetRot);

            if (smooth) {
                character.localRotation = Quaternion.Slerp (character.localRotation, m_CharacterTargetRot,
                    smoothTime * Time.deltaTime);
                camera.localRotation = Quaternion.Slerp (camera.localRotation, m_CameraTargetRot,
                    smoothTime * Time.deltaTime);
            } else {
                character.localRotation = m_CharacterTargetRot;
                camera.localRotation = m_CameraTargetRot;
            }
        }
        // to detect rotation distance the camera rotated
        if(Input.GetAxis("Mouse X") &lt; 0){
            LeftCounter++;          //Left rotation distance
            Debug.Log("Moved left " + LeftCounter + " times");
        }
         if(Input.GetAxis("Mouse X") &gt; 0){
            RightCounter++;         //Right rotation distance
            Debug.Log("Mouse right " + RightCounter + " times");
            Debug.Log(RightCounter);

        }


        UpdateCursorLock();
    }

    public void SetCursorLock(bool value)
    {
        lockCursor = value;
        if(!lockCursor)
        {//we force unlock the cursor if the user disable the cursor locking helper
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible = true;
        }
    }

    public void UpdateCursorLock()
    {
        //if the user set "lockCursor" we check &amp; properly lock the cursos
        if (lockCursor)
            InternalLockUpdate();
    }

    private void InternalLockUpdate()
    {
        if(Input.GetKeyUp(KeyCode.Escape))
        {
            m_cursorIsLocked = false;
        }
        else if(Input.GetMouseButtonUp(0))
        {
            m_cursorIsLocked = true;
        }

        if (m_cursorIsLocked)
        {
            Cursor.lockState = CursorLockMode.Locked;
            Cursor.visible = false;
        }
        else if (!m_cursorIsLocked)
        {
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible = true;
        }
    }

    Quaternion ClampRotationAroundXAxis(Quaternion q)
    {
        q.x /= q.w;
        q.y /= q.w;
        q.z /= q.w;
        q.w = 1.0f;

        float angleX = 2.0f * Mathf.Rad2Deg * Mathf.Atan (q.x);

        angleX = Mathf.Clamp (angleX, MinimumX, MaximumX);

        q.x = Mathf.Tan (0.5f * Mathf.Deg2Rad * angleX);

        return q;
    }
</code></pre>