private void OnModuleSelected(SelectableModule selected) { OnModuleDeselected(); selectedModule = selected; selectedModule.Selected = true; SoundModuleMenu.OnModuleSelected(selectedModule); }
private void OnModuleHoverEnd() { if (hoverModule != null) { hoverModule = null; GetComponent <VRTK_ControllerEvents>().TriggerPressed -= OnTriggerPressedOverModule; } }
private void OnModuleDeselected() { if (selectedModule != null) { selectedModule.Selected = false; SoundModuleMenu.OnModuleDeselected(); selectedModule = null; } }
public void OnModuleSelected(SelectableModule module) { if (module.GetComponent <SoundModuleObject>()) { selectedSoundModule = module.GetComponent <SoundModuleObject>().Controller; selectedSoundModule.ModuleNameChanged += OnSelectedModuleNameChanged; SelectionText.text = selectedSoundModule.GetName(); } }
private void OnModuleHoverBegin(SelectableModule module) { if (module != null) { hoverModule = module; GetComponent <VRTK_ControllerEvents>().TriggerPressed += OnTriggerPressedOverModule; } else { OnModuleHoverEnd(); } }
private void OnPointerStateValid(object sender, DestinationMarkerEventArgs e) { PointerBlocker blocker = e.raycastHit.collider.GetComponent <PointerBlocker>(); if (blocker != null && blocker.Blocking) { OnModuleHoverEnd(); return; } pointer.pointerRenderer.tracerVisibility = VRTK_BasePointerRenderer.VisibilityStates.AlwaysOn; pointer.pointerRenderer.cursorVisibility = VRTK_BasePointerRenderer.VisibilityStates.AlwaysOn; SelectableModule module = e.raycastHit.collider.transform.GetComponentInActor <SelectableModule>(); OnModuleHoverBegin(module); }
public ModuleSelectionEventArgs(SelectableModule selectedModule) { SelectedModule = selectedModule; }