Exemple #1
0
 public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType)
 {
     base.OnHandleTrigger(camera, handleType);
     OnSetPutItOnTheObject(false);
     handlePos = transform.localPosition;
     OnPickUp();
 }
Exemple #2
0
 /// <summary>
 /// 拾取
 /// </summary>
 /// <param name="camera"></param>
 public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType)
 {
     mHandleType           = handleType;
     transform.eulerAngles = targetRot;
     isPut            = false;
     isHandle         = true;
     cameraTra        = camera;
     m_IntersectPlane = (cameraTra.position.z < 0) ? m_IntersectPlanePositive : m_IntersectPlaneNegative;
     OnPickUp();
 }
Exemple #3
0
 public static NoloDevice GetDevice(NoloDeviceType deviceIndex)
 {
     if (devices == null)
     {
         devices = new NoloDevice[NoloVR_Plugins.trackedDeviceNumber];
         for (int i = 0; i < devices.Length; i++)
         {
             devices[i] = new NoloDevice(i);
         }
     }
     return(devices[(int)deviceIndex]);
 }
 public override void OnReleseTrigger(NoloDeviceType handleType)
 {
     base.OnReleseTrigger(handleType);
     if (brokenTra == null)
     {
         return;
     }
     if (transform.position.y >= brokenTra.position.y)
     {
         _isBroken = true;
     }
     else
     {
         _isBroken = false;
     }
 }
Exemple #5
0
 /// <summary>
 /// 放下
 /// </summary>
 public override void OnReleseTrigger(NoloDeviceType handleType)
 {
     isPut       = true;
     mHandleType = handleType;
     SetParent();
     OnPutDown();
     transform.eulerAngles = defaultWorldRot;
     for (int i = 0; i < outLine.Length; i++)
     {
         if (outLine[i] == null)
         {
             continue;
         }
         outLine[i].color   = 0;
         outLine[i].enabled = false;
     }
 }
    /// <summary>
    /// 拾取
    /// </summary>
    /// <param name="camera"></param>
    public virtual void OnHandleTrigger(Transform camera, NoloDeviceType handleType)
    {
        mHandleType           = handleType;
        transform.eulerAngles = targetRot;
        isPut            = false;
        cameraTra        = camera;
        m_IntersectPlane = (cameraTra.position.z < 0) ? m_IntersectPlanePositive : m_IntersectPlaneNegative;

        isCountDown = false;
        currentTime = 0;

        if (entityID != null && entityID.Count > 0)
        {
            DataTools.SendImageToAndroid(entityID);
        }
        OnPickUp();
    }
 /// <summary>
 /// 放下
 /// </summary>
 public virtual void OnReleseTrigger(NoloDeviceType handleType)
 {
     isPut       = true;
     mHandleType = handleType;
     SetParent();
     OnPutDown();
     transform.eulerAngles = defaultWorldRot;
     isCountDown           = true;
     currentTime           = 0;
     for (int i = 0; i < outLine.Length; i++)
     {
         if (outLine[i] == null)
         {
             continue;
         }
         outLine[i].color   = 0;
         outLine[i].enabled = false;
     }
     if (this.transform.localPosition.y < -1f)
     {
         Debug.Log("移出太远");
         this.transform.localPosition = defaultLoacalPos;
     }
 }
 public static extern ControllerStates get_Nolo_ControllerStates(NoloDeviceType devicetype);
Exemple #9
0
 void OnEnable()
 {
     InitPointer();
     deviceType = GetComponent <NoloVR_TrackedDevice>().deviceType;
 }
Exemple #10
0
 public static Nolo_Transform GetPose(NoloDeviceType type)
 {
     return(GetPose((int)type));
 }
Exemple #11
0
 public static bool GetNoloConnectStatus(NoloDeviceType type)
 {
     return(GetNoloConnectStatus((int)type));
 }
Exemple #12
0
 public static void TriggerHapticPulse(NoloDeviceType type, int intensity)
 {
     TriggerHapticPulse((int)type, intensity);
 }
Exemple #13
0
 public void OnPickUp(NoloDeviceType var, Transform other)
 {
     OnGetScript(other)?.OnHandleTrigger(mainCamera.transform, var);
 }
Exemple #14
0
 public override void OnReleseTrigger(NoloDeviceType handleType)
 {
     base.OnReleseTrigger(handleType);
 }
 public static extern int get_Nolo_VersionID(NoloDeviceType devicetype);
 public static extern int get_Nolo_Battery(NoloDeviceType devicetype);
 public static extern int get_Nolo_StateByDeviceType(NoloDeviceType devicetype);
 public static extern void set_Nolo_TriggerHapticPulse(NoloDeviceType deviceType, int intensity);
 public override void OnHandleTrigger(Transform camera, NoloDeviceType handleType)
 {
     base.OnHandleTrigger(camera, handleType);
 }
 public static extern Nolo_Pose get_Nolo_Pose(NoloDeviceType devicetype);
Exemple #21
0
#pragma warning disable IDE0051 // 删除未使用的私有成员
    private void OnEnable()
#pragma warning restore IDE0051 // 删除未使用的私有成员
    {
        InitPointer();
        deviceType = GetComponent <NoloVR_TrackedDevice>().deviceType;
    }
Exemple #22
0
 public static Nolo_ControllerStates GetControllerStates(NoloDeviceType type)
 {
     return(GetControllerStates((int)type));
 }
Exemple #23
0
 private void OnExit(NoloDeviceType var, Transform other)
 {
     OnGetScript(other)?.OnReleseTrigger(var);
 }
Exemple #24
0
 public static int GetElectricity(NoloDeviceType type)
 {
     return(GetElectricity((int)type));
 }