Exemplo n.º 1
0
        /// <summary>
        /// 关闭主相机 绕自身轴转
        /// </summary>
        public void StopCameraSelfRotate()
        {
            EventCameraRotate.RemoveListener(RotateCameraSelf);

            isSelfRotateCameraEnable = false;

            isCameraRotateSelfInitialization = false;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 相机绕点转的暂停和重启方法
 /// </summary>
 /// <param name="isenable"></param>
 public void PauseOrRestart_CameraRotateSelf(bool isenable)
 {
     if (!isCameraRotateSelfInitialization)
     {
         return;
     }
     if (isenable)
     {
         EventCameraRotate.AddListener(RotateCameraSelf);
     }
     else
     {
         EventCameraRotate.RemoveListener(RotateCameraSelf);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 相机绕点转的暂停和重启方法
 /// </summary>
 /// <param name="isenable"></param>
 public void PauseOrRestart(bool isenable)
 {
     if (!isRotateCameraWithCenterInitialization)
     {
         return;
     }
     if (isenable)
     {
         EventCameraRotate.AddListener(RotateCameraToCenter);
         mBehaviour.IsEnable = true;
     }
     else
     {
         EventCameraRotate.RemoveListener(RotateCameraToCenter);
         mBehaviour.IsEnable = false;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 停止主相机 绕点旋转 相机会 设置回到 MCKinectObject下
        /// </summary>
        public void StopCameraRotateWithCenter()
        {
            tween.Kill();

            if (mBehaviour != null)
            {
                mBehaviour.OnExcuteDestroy();
            }

            if (dragMouseOrbit != null)
            {
                dragMouseOrbit.ClearData();
            }

            EventCameraRotate.RemoveListener(RotateCameraToCenter);

            isRotateCameraWithCenter = false;

            isRotateCameraWithCenterInitialization = false;

            RotateAndZoomManager.IsDone_StartCameraAroundCenter_Initialization = false;
        }
Exemplo n.º 5
0
    void ontest()
    {
        gameObject.AddGrabObject(onGrab);
        gameObject.RemoveGrabObject(onGrab);
        gameObject.RemoveGrabObjectAll();

        gameObject.AddReleaseObject(OnRelease);
        gameObject.RemoveReleaseObject(OnRelease);
        gameObject.RemoveReleaseObjectAll();

        gameObject.AddRayTargetEnter(OnTargetEnter);
        gameObject.RemoveRayTargetEnter(OnTargetEnter);
        gameObject.RemoveRayTargetEnter();


        gameObject.AddRayTargetExit(OnTargetExit);
        gameObject.RemoveRayTargetExit();
        gameObject.RemoveRayTargetExit(OnTargetExit);


        EventHandRay.AddListener(onRay);
        EventHandRay.RemoveListener(onRay);

        EventHandRays.AddListener(OnRays);
        EventHandRays.RemoveListener(OnRays);

        EventHandStart.AddListener(onstart);
        EventHandStart.RemoveListener(onstart);

        EventHandStop.AddListener(onstop);
        EventHandStop.RemoveListener(onstop);

        EventHandUIRay.AddListener(onRay);
        EventHandUIRay.RemoveListener(onRay);

        EventCameraZoom.AddListener(onzoom);
        EventCameraZoom.RemoveListener(onzoom);

        EventCameraRotate.AddListener(onrotate);
        EventCameraRotate.RemoveListener(onrotate);

        EventHandGrabObject.AddListener(ongrabobject);
        EventHandGrabObject.RemoveListener(ongrabobject);

        EventHandReleaseObject.AddListener(onreleaseobject);
        EventHandReleaseObject.RemoveListener(onreleaseobject);

        EventHandGrabObjectKey.AddListener(gameObject, onGrab);
        EventHandGrabObjectKey.RemoveListener(gameObject, onGrab);

        EventHandReleaseObjectKey.AddListener(gameObject, OnRelease);
        EventHandReleaseObjectKey.RemoveListener(gameObject, OnRelease);

        EventHandRayTarget.AddListener(onraytarget);
        EventHandRayTarget.RemoveListener(onraytarget);

        EventHandRayTargetEnter.AddListener(gameObject, OnTargetEnter);
        EventHandRayTargetEnter.RemoveListener(gameObject, OnTargetEnter);

        EventHandRayTargetExit.AddListener(gameObject, OnTargetExit);
        EventHandRayTargetExit.RemoveListener(gameObject, OnTargetExit);

        EventHandUIRayEnter.AddListener(gameObject, onuienter);
        EventHandUIRayEnter.RemoveListener(gameObject, onuienter);

        EventHandUIRayExit.AddListener(gameObject, onuiexit);
        EventHandUIRayExit.RemoveListener(gameObject, onuiexit);

        EventHandUIRay.AddListener(onRay);
        EventHandUIRay.RemoveListener(onRay);
    }