示例#1
0
    /// <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);
    }
示例#2
0
 /// <summary>
 /// 初始化相机
 /// </summary>
 private void InitCamera()
 {
     mainCameraController.SetFollower(mainPlayer.transform);
 }