private void OnChangeOrbit(int newOrbit)
    {
        if (newOrbit > 3)
        {
            _camera.orthographicSize = _zoomSpace;
        }
        else
        {
            _camera.orthographicSize = _zoomNormal;

            if (_pegi.IsInSpace)
            {
                _finalPos          = _pegi.transform.right * _offsetPegi.x + _pegi.transform.up * _offsetPegi.y;
                transform.position = _finalPos;
                transform.rotation = _pegi.transform.rotation;
            }
        }
        _camera.enabled = !PlanetController.IsSpace(newOrbit);
    }
 private void OnChangeOrbit(int newOrbit)
 {
     _camera.enabled = PlanetController.IsSpace(newOrbit);
 }
Пример #3
0
 private void OnChangeOrbit(int onChangeOrbit)
 {
     gameObject.SetActive(PlanetController.IsSpace(onChangeOrbit));
 }