// Extend the unlock if ThalmcHub's locking policy is standard, and notifies the given myo that a user action was // recognized. void ExtendUnlockAndNotifyUserAction(ThalmicMyo myo) { ThalmicHub hub = ThalmicHub.instance; if (hub.lockingPolicy == LockingPolicy.Standard) { myo.Unlock (UnlockType.Timed); } myo.NotifyUserAction (); }
// Extend the unlock if ThalmcHub's locking policy is standard, and notifies the given myo that a user action was // recognized. void ExtendUnlockAndNotifyUserAction(ThalmicMyo myo) { ThalmicHub hub = ThalmicHub.instance; if (hub.lockingPolicy == LockingPolicy.Standard) { myo.Unlock(UnlockType.Timed); } myo.NotifyUserAction(); }
// Extend the unlock if ThalmcHub's locking policy is standard, and notifies the given myo that a user action was // recognized. void ExtendUnlockAndNotifyUserAction(ThalmicMyo myo) { ThalmicHub hub = ThalmicHub.instance; if (hub.lockingPolicy == LockingPolicy.Standard) { myo.Unlock(UnlockType.Timed); } if (!OnPlayer) { Debug.Log("colourboxevent"); myo.NotifyUserAction(); } }
// Update is called once per frame void Update() { myo.Unlock(UnlockType.Hold); if (myo.pose != _lastPose) { if (myo.pose == Pose.Fist && Time.time - lastTime > timethreshold) { lastTime = Time.time; _lastPose = myo.pose; UnityEngine.Vector3 point = findCollisionPosition(); if (point != UnityEngine.Vector3.zero) { tapHandler.handleTap(point.x, point.y); } } } }
void OnApplicationQuit() { Debug.Log("Resetting unlock behaviour."); myo.Unlock(UnlockType.Timed); }