Exemple #1
0
        /// <summary>
        /// 开启主相机 绕自身轴转
        /// </summary>
        public void StartCameraSelfRotate()
        {
            rotateCore = new RotateCore();

            if (mainCamera == null)
            {
                mainCamera = MUtility.MainCamera;
            }

            if (otherHelpCameraSelfRotate == null)
            {
                otherHelpCameraSelfRotate = new OtherRotateHelp(cameraSelfRotateXlimits, cameraSelfRotateYlimits, rotateCameraSelfSpeed);
            }

            EventCameraRotate.AddListener(RotateCameraSelf);

            isSelfRotateCameraEnable = true;

            isCameraRotateSelfInitialization = true;
        }
Exemple #2
0
 /// <summary>
 /// 插件实现的自身物体旋转
 /// </summary>
 /// <param name="rotateGameobjOnlyY">只转y轴的自身物体</param>
 /// <param name="rotateGameobjFatherOnlyX">旋转X轴的物体</param>
 /// <param name="pos"></param>
 /// <param name="otherRotateHelp"></param>
 public void RotateWithPluginHelp(GameObject rotateGameobjOnlyY, GameObject rotateGameobjFatherOnlyX, Vector3 pos, OtherRotateHelp otherRotateHelp)
 {
     otherRotateHelp.RotateFun(rotateGameobjFatherOnlyX.transform, pos);
 }