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); }
public static void SetButtonState(HVRHandSide side, HVRButtons button, HVRButtonState state) { var map = side == HVRHandSide.Right ? _rightButtonStates : _leftButtonStates; map[button] = state; }
protected void ResetButton(ref HVRButtonState buttonState) { buttonState.JustDeactivated = false; buttonState.JustActivated = false; buttonState.Value = 0f; }
protected abstract void CheckButtonState(HVRButtons button, ref HVRButtonState buttonState);