本文整理汇总了C#中VRTK.ControllerInteractionEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ControllerInteractionEventArgs类的具体用法?C# ControllerInteractionEventArgs怎么用?C# ControllerInteractionEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ControllerInteractionEventArgs类属于VRTK命名空间,在下文中一共展示了ControllerInteractionEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisablePointerBeam
protected override void DisablePointerBeam(object sender, ControllerInteractionEventArgs e)
{
base.PointerSet();
base.DisablePointerBeam(sender, e);
TogglePointerCursor(false);
curvedBeam.TogglePoints(false);
}
示例2: DoTouchpadPressed
void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e)
{
for (int i = 0; i < 20; i++)
{
Instantiate(spawnMe, position, Quaternion.identity);
}
}
示例3: DoStopUseObject
private void DoStopUseObject(object sender, ControllerInteractionEventArgs e)
{
if (IsObjectHoldOnUse(usingObject) || GetObjectUsingState(usingObject) >= 2)
{
SetObjectUsingState(usingObject, 0);
UnuseInteractedObject();
}
}
示例4: DoMenuOn
void DoMenuOn(object sender, ControllerInteractionEventArgs e)
{
if (!menuInit)
{
InitMenu();
}
clonedMenuObject.SetActive(true);
menuActive = true;
}
示例5: DoTriggerReleased
private void DoTriggerReleased(object sender, ControllerInteractionEventArgs e)
{
tooltips.ShowTips(false, VRTK_ControllerTooltips.TooltipButtons.TriggerTooltip);
actions.ToggleHighlightTrigger(false);
if (!events.AnyButtonPressed())
{
actions.SetControllerOpacity(1f);
}
}
示例6: DoTouchpadReleased
private void DoTouchpadReleased(object sender, ControllerInteractionEventArgs e)
{
if (roomExtender.additionalMovementEnabledOnButtonPress)
{
DisableAdditionalMovement();
}
else
{
EnableAdditionalMovement();
}
}
示例7: DoStartUseObject
private void DoStartUseObject(object sender, ControllerInteractionEventArgs e)
{
GameObject touchedObject = interactTouch.GetTouchedObject();
if (touchedObject != null && interactTouch.IsObjectInteractable(touchedObject))
{
UseInteractedObject(touchedObject);
if (!IsObjectHoldOnUse(usingObject))
{
SetObjectUsingState(usingObject, GetObjectUsingState(usingObject) + 1);
}
}
}
示例8: DoTouchpadPressed
private void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e)
{
roomExtender.additionalMovementMultiplier = e.touchpadAxis.magnitude * 5 > 1 ? e.touchpadAxis.magnitude * 5 : 1;
if (roomExtender.additionalMovementEnabledOnButtonPress)
{
EnableAdditionalMovement();
}
else
{
DisableAdditionalMovement();
}
}
示例9: DoTouchpadAxisChanged
//Touchpad finger moved position
private void DoTouchpadAxisChanged(object sender, ControllerInteractionEventArgs e)
{
//Convert Touchpad Vector2 to Angle (0 to 360)
float angle = Mathf.Atan2(e.touchpadAxis.y, e.touchpadAxis.x) * Mathf.Rad2Deg;
angle = 90.0f - angle;
if (angle < 0)
{
angle += 360.0f;
}
currentAngle = 360 - angle;
menu.HoverButton(currentAngle);
}
示例10: DoApplicationMenuPressed
private void DoApplicationMenuPressed(object sender, ControllerInteractionEventArgs e)
{
switch (roomExtender.movementFunction)
{
case VRTK_RoomExtender.MovementFunction.Nonlinear:
roomExtender.movementFunction = VRTK_RoomExtender.MovementFunction.LinearDirect;
break;
case VRTK_RoomExtender.MovementFunction.LinearDirect:
roomExtender.movementFunction = VRTK_RoomExtender.MovementFunction.Nonlinear;
break;
default:
break;
}
}
示例11: DoUseOn
private void DoUseOn(object sender, ControllerInteractionEventArgs e)
{
targetPointerRotation = maxRotation;
}
示例12: DoTriggerPressed
private void DoTriggerPressed(object sender, ControllerInteractionEventArgs e)
{
tooltips.ShowTips(true, VRTK_ControllerTooltips.TooltipButtons.TriggerTooltip);
actions.ToggleHighlightTrigger(true, Color.yellow, 0.5f);
actions.SetControllerOpacity(0.8f);
}
示例13: DoTriggerReleased
void DoTriggerReleased(object sender, ControllerInteractionEventArgs e)
{
rcCarScript.SetTriggerAxis(0f);
}
示例14: EnablePointerBeam
protected virtual void EnablePointerBeam(object sender, ControllerInteractionEventArgs e)
{
TurnOnBeam(e.controllerIndex);
}
示例15: SetPointerDestination
protected virtual void SetPointerDestination(object sender, ControllerInteractionEventArgs e)
{
PointerSet();
}