public override void StopTouching(GameObject previousTouchingObject) { base.StopTouching(previousTouchingObject); FloorInfoPanel.gameObject.SetActive(false); VRTK_ControllerActions action = previousTouchingObject.GetComponent <VRTK_ControllerActions> (); action.ToggleHighlightTrigger(false); action.SetControllerOpacity(1f); }
public override void StartTouching(GameObject currentTouchingObject) { base.StartTouching(currentTouchingObject); if (state == State.IDLE) { FloorInfoPanel.gameObject.SetActive(true); FloorInfoPanel.SetText(Info); } VRTK_ControllerActions action = currentTouchingObject.GetComponent <VRTK_ControllerActions> (); action.ToggleHighlightTrigger(true, Color.yellow); action.SetControllerOpacity(0.5f); }
//如果板機壓下去 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); }