Beispiel #1
0
 public bool IsControlUp(DeviceState state)
 {
     return((primary != null && primary.GetValueOrDefault().IsControlUp(state)) ||
            (secondary != null && secondary.GetValueOrDefault().IsControlUp(state)));
 }
Beispiel #2
0
 public bool IsControlReleased(DeviceState state, DeviceState prevState)
 {
     return((primary != null && primary.GetValueOrDefault().IsControlReleased(state, prevState)) ||
            (secondary != null && secondary.GetValueOrDefault().IsControlReleased(state, prevState)));
 }
Beispiel #3
0
 public bool IsControlReleased(DeviceState state, DeviceState prevState)
 {
     return(IsControlUp(state) && IsControlDown(prevState));
 }
Beispiel #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())));
 }
Beispiel #5
0
 public bool IsControlHeld(DeviceState state, DeviceState prevState)
 {
     return(IsControlDown(state) && IsControlDown(prevState));
 }