protected override void OnShow(object userData) { base.OnShow(userData); m_Movement = GetComponent <RebanaMovement>(); // 设置相机 if (Camera.main != null) { var cinemachineBrain = Camera.main.GetComponent <CinemachineBrain>(); cinemachineBrain.ActiveVirtualCamera.Follow = CachedTransform; var cinemachine2D = (CinemachineVirtualCamera)cinemachineBrain.ActiveVirtualCamera; cinemachine2D.m_Lens.OrthographicSize = 4.5f; } }
protected override void Start() { base.Start(); FollowTarget = Rebana.GetPlayer().GetComponent <RebanaMovement>(); }