Beispiel #1
0
 private void OnToggleView()
 {
     if (_orthoActive)
     {
         float direction = activeSnapPosition.transform.position.z < 0 ? -1 : 1;
         MoveLayers(direction);
         orthoCamera.Disable();
         activeSnapPosition  = null;
         orbitCamera.enabled = true;
         orbitCamera.SetAngle(30, 0);
     }
     else
     {
         orbitCamera.enabled = false;
         activeSnapPosition  = FindNearestPosition(snapPositions, _camera.transform);
         float direction = activeSnapPosition.transform.position.z < 0 ? 1 : -1;
         MoveLayers(direction);
         orthoCamera.Activate(activeSnapPosition);
     }
     _orthoActive = !_orthoActive;
 }