GetButtonDown() публичный Метод

public GetButtonDown ( ) : BaseController.eButtonId>.Dictionary
Результат BaseController.eButtonId>.Dictionary
Пример #1
0
        /// <summary>
        ///
        /// </summary>
        protected virtual void Update()
        {
            if (canRecenter)
            {
                // PC : Push the keyboard for debug.
                if (Input.GetKeyDown(KeyCode.R))
                {
                    Recenter(true);
                }
                // Mobile VR : Hold the Home button for a while.
                if (ControllerInputManager.GetButtonUp(ControllerType.Controller, (uint)XimmerseButton.Home))
                {
                    m_LastHomeButtonPressedTime = -1.0f;
                }
                else if (m_LastHomeButtonPressedTime > 0.0f && (Time.time - m_LastHomeButtonPressedTime) >= 1.0f)
                {
                    m_LastHomeButtonPressedTime = -1.0f;
                    Recenter(true);
                }
                else if (ControllerInputManager.GetButtonDown(ControllerType.Controller, (uint)XimmerseButton.Home))
                {
                    m_LastHomeButtonPressedTime = Time.time;
                }
            }

            //setHMDRotation();
        }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 protected virtual void Update()
 {
     if (canRecenter)
     {
         if (ControllerInputManager.GetButtonDown(ControllerType.Controller, (uint)XimmerseButton.Home))
         {
             m_HomeIsDownLastTime = Time.time;
         }
         if (Input.GetKeyDown(KeyCode.R) || (ControllerInputManager.GetButton(ControllerType.Controller, (uint)XimmerseButton.Home) && Time.time - m_HomeIsDownLastTime > 1.0f))
         {
             Recenter(true);
         }
     }
 }