1
This commit is contained in:
@@ -14,7 +14,6 @@ namespace BITKit
|
||||
public class CinemachineHelper : MonoBehaviour
|
||||
{
|
||||
internal static CinemachineHelper Singleton { get; private set; }
|
||||
[SerializeReference, SubclassSelector] public References ads;
|
||||
public float Ads { get; private set; }
|
||||
public CinemachineBrain brain;
|
||||
private void Awake()
|
||||
@@ -24,13 +23,9 @@ namespace BITKit
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
var playerConfig = Data.Get<PlayerConfig>();
|
||||
var currentActive = brain.ActiveVirtualCamera as CinemachineVirtualCamera;
|
||||
if (currentActive is not null && playerConfig is not null)
|
||||
{
|
||||
var currentFov = currentActive.m_Lens.FieldOfView;
|
||||
Ads = currentFov / playerConfig.Fov;
|
||||
}
|
||||
if (brain.ActiveVirtualCamera is not CinemachineVirtualCamera currentActive) return;
|
||||
var currentFov = currentActive.m_Lens.FieldOfView;
|
||||
Ads = currentFov / PlayerConfig.Singleton.Fov;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user