示例#1
0
        private void OnModuleSelected(SelectableModule selected)
        {
            OnModuleDeselected();

            selectedModule          = selected;
            selectedModule.Selected = true;
            SoundModuleMenu.OnModuleSelected(selectedModule);
        }
示例#2
0
 private void OnModuleHoverEnd()
 {
     if (hoverModule != null)
     {
         hoverModule = null;
         GetComponent <VRTK_ControllerEvents>().TriggerPressed -= OnTriggerPressedOverModule;
     }
 }
示例#3
0
 private void OnModuleDeselected()
 {
     if (selectedModule != null)
     {
         selectedModule.Selected = false;
         SoundModuleMenu.OnModuleDeselected();
         selectedModule = null;
     }
 }
示例#4
0
 public void OnModuleSelected(SelectableModule module)
 {
     if (module.GetComponent <SoundModuleObject>())
     {
         selectedSoundModule = module.GetComponent <SoundModuleObject>().Controller;
         selectedSoundModule.ModuleNameChanged += OnSelectedModuleNameChanged;
         SelectionText.text = selectedSoundModule.GetName();
     }
 }
示例#5
0
 private void OnModuleHoverBegin(SelectableModule module)
 {
     if (module != null)
     {
         hoverModule = module;
         GetComponent <VRTK_ControllerEvents>().TriggerPressed += OnTriggerPressedOverModule;
     }
     else
     {
         OnModuleHoverEnd();
     }
 }
示例#6
0
        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);
        }
示例#7
0
 public ModuleSelectionEventArgs(SelectableModule selectedModule)
 {
     SelectedModule = selectedModule;
 }