public float MouseWheelSensitivity = 5f;                    // Mouse wheel/scroll sensitivity.

    private void Start()
    {
        if (!_thirdPersonCamera)
        {
            _thirdPersonCamera = GetComponent <ThirdPerson_Camera> ();
        }
    }
    public float mouseWheelSensitivity = 5f;                    // Mouse wheel/scroll sensitivity.

    void Start()
    {
        if (!thirdPersonCamera)
        {
            thirdPersonCamera = GetComponent <ThirdPerson_Camera> ();
        }
    }
Esempio n. 3
0
    private void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        // If main camera is null, set as main camera
        if (Camera.main == null)
        {
            tag = "MainCamera";
        }

        // Ensure our distance is between min and max (valid)
        Distance       = Mathf.Clamp(Distance, DistanceMin, DistanceMax);
        _startDistance = Distance;
        Reset();
    }
Esempio n. 4
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        // If main camera is null, set as main camera
        if (Camera.main == null)
        {
            this.tag = "MainCamera";
        }

        // Ensure our distance is between min and max (valid)
        distance      = Mathf.Clamp(distance, distanceMin, distanceMax);
        startDistance = distance;
        Reset();
    }
Esempio n. 5
0
    private void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        // If main camera is null, set as main camera
        if (Camera.main == null)
        {
            tag = "MainCamera";
        }

        //Cache MainCamera to eliminate GetComponent() calls every frame.
        myCamera = Camera.main;

        //Cache Transform to eliminate overhead
        myTransform = transform;

        // Ensure our distance is between min and max (valid)
        Distance       = Mathf.Clamp(Distance, DistanceMin, DistanceMax);
        _startDistance = Distance;
        Reset();
    }
 void Start()
 {
     if (!thirdPersonCamera)
         thirdPersonCamera = GetComponent<ThirdPerson_Camera> ();
 }
Esempio n. 7
0
    void Start()
    {
        if (instance == null)
            instance = this;

        // If main camera is null, set as main camera
        if (Camera.main == null)
            this.tag = "MainCamera";

        // Ensure our distance is between min and max (valid)
        distance = Mathf.Clamp (distance, distanceMin, distanceMax);
        startDistance = distance;
        Reset ();
    }