private float GetTranslateScaleDelta(SrAxisType srAxis)
        {
            var distance = Vector3.Distance(Camera.transform.position, _selectedObject.transform.position);

            distance *= 2.0f;

            var delta = Time.deltaTime * distance * MovementSpeedMultiplier;

            switch (srAxis)
            {
            case SrAxisType.Z:
            case SrAxisType.X:
                return(Input.GetAxis("Mouse X") * delta);

            case SrAxisType.Y:
                return(Input.GetAxis("Mouse Y") * delta);

            case SrAxisType.None:
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(srAxis), srAxis, null);
            }

            return(0f);
        }
Esempio n. 2
0
 private void Movement(SrAxisType srAxis)
 {
     gameObject.SetActive(srAxis == this.SrAxis);
 }