/// <summary> /// 实例化摄像机 /// </summary> /// <param name="trans"></param> private void InitCamera(Transform trans) { mainCamera = GameObject.Find("Main Camera"); mainCameraController = mainCamera.GetComponent <MainCameraController>(); mainCameraController.SetFollower(trans); rotateCamera = GameObject.Find("RotateCamera"); rotateCameraController = rotateCamera.GetComponent <RotateCamera>(); rotateCamera.SetActive(false); }
/// <summary> /// 初始化相机 /// </summary> private void InitCamera() { mainCameraController.SetFollower(mainPlayer.transform); }