protected virtual void Blink(float transitionSpeed) { fadeInTime = transitionSpeed; if (transitionSpeed > 0f) { VRTK_SDK_Bridge.HeadsetFade(blinkToColor, 0); } Invoke("ReleaseBlink", blinkPause); }
/// <summary> /// The Unfade method initiates the headset to change colour back to a transparent colour over a given duration. /// </summary> /// <param name="duration">The time in seconds to take to complete the unfade transition.</param> public virtual void Unfade(float duration) { isFaded = true; isTransitioning = true; VRTK_SDK_Bridge.HeadsetFade(Color.clear, duration); OnHeadsetUnfadeStart(SetHeadsetFadeEvent(headset, duration)); CancelInvoke("FadeComplete"); Invoke("UnfadeComplete", duration); }
// Token: 0x06001A65 RID: 6757 RVA: 0x0008B97C File Offset: 0x00089B7C public virtual void Unfade(float duration) { this.isFaded = true; this.isTransitioning = true; VRTK_SDK_Bridge.HeadsetFade(Color.clear, duration, false); this.OnHeadsetUnfadeStart(this.SetHeadsetFadeEvent(this.headset, duration)); base.CancelInvoke("FadeComplete"); base.Invoke("UnfadeComplete", duration); }
// Token: 0x060017A2 RID: 6050 RVA: 0x0007E694 File Offset: 0x0007C894 protected virtual void Blink(float transitionSpeed) { base.StartCoroutine(this.PreventTeleport(transitionSpeed)); this.fadeInTime = transitionSpeed; if (transitionSpeed > 0f) { VRTK_SDK_Bridge.HeadsetFade(this.blinkToColor, 0f, false); } base.Invoke("ReleaseBlink", this.blinkPause); }
protected virtual void Blink(float transitionSpeed) { fadeInTime = transitionSpeed; if (transitionSpeed > 0f) { VRTK_SDK_Bridge.HeadsetFade(blinkToColor, 0); if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "Revised") { AudioManager_Script.Get.PlaySE(SfxType.teleport); } } Invoke("ReleaseBlink", blinkPause); }
// Token: 0x06001866 RID: 6246 RVA: 0x00081D34 File Offset: 0x0007FF34 private void SnapRotate(bool blink = false, bool flipDirection = false) { this.lastSnapRotate = Time.timeSinceLevelLoad + this.snapRotateDelay; float angle = flipDirection ? 180f : (this.snapRotateAngle * (this.multiplyMovement ? this.horizontalMultiplier : 1f) * (float)((this.touchAxis.x < 0f) ? -1 : 1)); this.RotateAroundPlayer(angle); if (blink) { this.blinkFadeInTime = this.snapRotateDelay * this.blinkDurationMultiplier; VRTK_SDK_Bridge.HeadsetFade(Color.black, 0f, false); base.Invoke("ReleaseBlink", 0.01f); } this.OnAxisMovement(flipDirection ? VRTK_TouchpadMovement.AxisMovementType.FlipDirection : VRTK_TouchpadMovement.AxisMovementType.SnapRotate, (this.touchAxis.x < 0f) ? VRTK_TouchpadMovement.AxisMovementDirection.Left : VRTK_TouchpadMovement.AxisMovementDirection.Right); }
private void SnapRotate(bool blink = false, bool flipDirection = false) { lastSnapRotate = Time.timeSinceLevelLoad + snapRotateDelay; var angle = (flipDirection ? 180 : (snapRotateAngle * (multiplyMovement ? horizontalMultiplier : 1)) * (touchAxis.x < 0 ? -1 : 1)); RotateAroundPlayer(angle); if (blink) { blinkFadeInTime = snapRotateDelay * blinkDurationMultiplier; VRTK_SDK_Bridge.HeadsetFade(Color.black, 0); Invoke("ReleaseBlink", 0.01f); } OnAxisMovement((flipDirection ? AxisMovementType.FlipDirection : AxisMovementType.SnapRotate), (touchAxis.x < 0 ? AxisMovementDirection.Left : AxisMovementDirection.Right)); }
private void Warp(bool blink = false, bool horizontal = false) { var distance = warpRange * (multiplyMovement ? (horizontal ? horizontalMultiplier : verticalMultiplier) : 1); var deviceDirector = VRTK_DeviceFinder.DeviceTransform(deviceForDirection); var bodyPos = playArea.TransformPoint(bodyCollider.center); var targetPos = bodyPos + ((horizontal ? deviceDirector.right : deviceDirector.forward) * distance * ((horizontal ? touchAxis.x : touchAxis.y) < 0 ? -1 : 1)); var headMargin = 0.2f; RaycastHit rh; // direction raycast to stop near obstacles Vector3 direction = (horizontal ? (touchAxis.x < 0 ? headset.right : headset.right * -1) : (touchAxis.y > 0 ? headset.forward : headset.forward * -1)); if (Physics.Raycast(headset.position + (Vector3.up * headMargin), direction, out rh, distance)) { targetPos = rh.point - (direction * bodyCollider.radius); } // vertical raycast for height position if (Physics.Raycast(targetPos + (Vector3.up * (warpMaxAltitudeChange + headMargin)), Vector3.down, out rh, (warpMaxAltitudeChange + headMargin) * 2)) { targetPos.y = rh.point.y + (bodyCollider.height / 2); lastWarp = Time.timeSinceLevelLoad + warpDelay; playArea.position = targetPos - bodyPos + playArea.position; if (blink) { blinkFadeInTime = warpDelay * blinkDurationMultiplier; VRTK_SDK_Bridge.HeadsetFade(Color.black, 0); Invoke("ReleaseBlink", 0.01f); } OnAxisMovement(AxisMovementType.Warp, (horizontal ? (touchAxis.x < 0 ? AxisMovementDirection.Left : AxisMovementDirection.Right) : (touchAxis.y < 0 ? AxisMovementDirection.Backward : AxisMovementDirection.Forward))); } }
protected virtual void Blink(float transitionSpeed) { fadeInTime = transitionSpeed; VRTK_SDK_Bridge.HeadsetFade(Color.black, 0); Invoke("ReleaseBlink", blinkPause); }
private void ReleaseBlink() { VRTK_SDK_Bridge.HeadsetFade(Color.clear, fadeInTime); fadeInTime = 0f; }
protected virtual void ReleaseBlink() { VRTK_SDK_Bridge.HeadsetFade(Color.clear, fadeInTime); fadeInTime = 0f; }
protected virtual void ReleaseBlink(float blinkSpeed) { VRTK_SDK_Bridge.HeadsetFade(Color.clear, blinkSpeed); }
// Token: 0x06001867 RID: 6247 RVA: 0x00081DF2 File Offset: 0x0007FFF2 private void ReleaseBlink() { VRTK_SDK_Bridge.HeadsetFade(Color.clear, this.blinkFadeInTime, false); }