Пример #1
0
 public bool IsControlUp(DeviceState state)
 {
     return((primary != null && primary.GetValueOrDefault().IsControlUp(state)) ||
            (secondary != null && secondary.GetValueOrDefault().IsControlUp(state)));
 }
Пример #2
0
 public bool IsControlReleased(DeviceState state, DeviceState prevState)
 {
     return((primary != null && primary.GetValueOrDefault().IsControlReleased(state, prevState)) ||
            (secondary != null && secondary.GetValueOrDefault().IsControlReleased(state, prevState)));
 }
Пример #3
0
 public bool IsControlReleased(DeviceState state, DeviceState prevState)
 {
     return(IsControlUp(state) && IsControlDown(prevState));
 }
Пример #4
0
 public bool IsControlUp(DeviceState state)
 {
     return((key != null && state.keyboard.IsKeyUp(key.GetValueOrDefault())) ||
            (button != null && state.gamepad.IsButtonUp(button.GetValueOrDefault())) ||
            (mouse != null && !MouseHelper.ButtonClicked(state.mouse, mouse.GetValueOrDefault())));
 }
Пример #5
0
 public bool IsControlHeld(DeviceState state, DeviceState prevState)
 {
     return(IsControlDown(state) && IsControlDown(prevState));
 }