Пример #1
0
 private void MacroToMicro()
 {
     GetComponent <Valve.VR.InteractionSystem.Hand>().HideController(true);
     if (m_currentMacroHand.GetCurrentSubspace() && m_currentMacroHand.GetCurrentSubspace().GetNumberUsedHandsInner() == 0)//if isnt other macrohand inner
     {
         m_currentMacroHand.SetEmptyColorCurrentSubspace();
     }
     //if (m_currentMacroHand.GetCurrentSubspace())
     //    m_currentMacroHand.GetCurrentSubspace().m_HandsActivedInner.Remove(m_currentMacroHand);
     //GetComponent<Collider>().enabled = false;
     modeTypeHand = Constants.INT_HAND_MODE_MICRO;
     ChangeModeTypeHand(modeTypeHand);
     GetComponent <Valve.VR.InteractionSystem.Hand>().useFingerJointHover = true;
 }
Пример #2
0
 private void ChangeCurrentSelectionSpace()
 {
     if (m_TypeHand == Constants.HAND_PRIMARY_USE)
     {
         m_ContactInteractables[m_currentIndexSelected].m_HandsActivedInner.Remove(this);
         if (m_ContactInteractables[m_currentIndexSelected].GetNumberUsedHandsInner() == 0 ||
             m_otherHand.GetCurrentSubspace() != m_ContactInteractables[m_currentIndexSelected])
         {
             m_ContactInteractables[m_currentIndexSelected].GetComponent <Renderer>().material.color = Constants.SPACE_COLOR_WITHOUT_CONTROLLER;
         }
         Drop();
         if (++m_currentIndexSelected == m_ContactInteractables.Count)
         {
             m_currentIndexSelected = 0;
         }
         m_ContactInteractables[m_currentIndexSelected].m_HandsActivedInner.Add(this);
         m_ContactInteractables[m_currentIndexSelected].GetComponent <Renderer>().material.color = Constants.SPACE_COLOR_WITH_CONTROLLER;
         DetectTypeHand();
     }
 }