Camera Resolution + End Point indication
This commit is contained in:
@@ -7,11 +7,15 @@ namespace Camera
|
||||
{
|
||||
public class CameraPlayerFinder : MonoBehaviour
|
||||
{
|
||||
private const float FollowOrthoSize = 7.5f;
|
||||
private const float FixedOrthoSize = 15f;
|
||||
[SerializeField] private int FixedResolutionX = 426;
|
||||
[SerializeField] private int FixedResolutionY = 240;
|
||||
[SerializeField] private int FollowResolutionX = 278;
|
||||
[SerializeField] private int FollowResolutionY = 162;
|
||||
|
||||
private CinemachineVirtualCamera _cinemachineVirtualCamera;
|
||||
private PixelPerfectCamera pixelPerfectCamera = null;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_cinemachineVirtualCamera = GetComponent<CinemachineVirtualCamera>();
|
||||
@@ -25,15 +29,15 @@ namespace Camera
|
||||
if (_cinemachineVirtualCamera.Follow == null)
|
||||
{
|
||||
_cinemachineVirtualCamera.Follow = LevelManager.Instance.Player.transform;
|
||||
_cinemachineVirtualCamera.m_Lens.OrthographicSize = FollowOrthoSize;
|
||||
pixelPerfectCamera.enabled = false;
|
||||
pixelPerfectCamera.refResolutionX = FollowResolutionX;
|
||||
pixelPerfectCamera.refResolutionY = FollowResolutionY;
|
||||
}
|
||||
}
|
||||
else if (_cinemachineVirtualCamera.Follow != LevelManager.Instance.CurrentLevel.FixedCameraPoint)
|
||||
{
|
||||
_cinemachineVirtualCamera.Follow = LevelManager.Instance.CurrentLevel.FixedCameraPoint;
|
||||
// _cinemachineVirtualCamera.m_Lens.OrthographicSize = FixedOrthoSize;
|
||||
pixelPerfectCamera.enabled = true;
|
||||
pixelPerfectCamera.refResolutionX = FixedResolutionX;
|
||||
pixelPerfectCamera.refResolutionY = FixedResolutionY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user