示例#1
0
        protected void SetButtonState(HVRButtons button, ref HVRButtonState buttonState, bool pressed)
        {
            if (pressed)
            {
                if (!buttonState.Active)
                {
                    buttonState.JustActivated = true;
                    buttonState.Active        = true;
                }
            }
            else
            {
                if (buttonState.Active)
                {
                    buttonState.Active          = false;
                    buttonState.JustDeactivated = true;
                }
            }

            SetButtonState(Side, button, buttonState);
        }
示例#2
0
        public static void SetButtonState(HVRHandSide side, HVRButtons button, HVRButtonState state)
        {
            var map = side == HVRHandSide.Right ? _rightButtonStates : _leftButtonStates;

            map[button] = state;
        }
示例#3
0
 protected void ResetButton(ref HVRButtonState buttonState)
 {
     buttonState.JustDeactivated = false;
     buttonState.JustActivated   = false;
     buttonState.Value           = 0f;
 }
示例#4
0
 protected abstract void CheckButtonState(HVRButtons button, ref HVRButtonState buttonState);