Ejemplo n.º 1
0
    private void SetCamera()
    {
        if (cameraCtrl == null)
        {
            Debug.Log("不存在相机脚本");
            return;
        }

        //设置相机跟随主角
        cameraCtrl.transform.position = transform.position;
        //看着主角
        cameraCtrl.m_CameraZoomContaner.transform.LookAt(transform.position);

        if (isCameraChange)
        {
            cameraCtrl.SetCameraState(cameraState, cameraDirection);
        }
    }