Пример #1
0
        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;
            }
        }
Пример #2
0
 protected override void Start()
 {
     base.Start();
     FollowTarget = Rebana.GetPlayer().GetComponent <RebanaMovement>();
 }