private bool buttonNotHeldEnough(ButtonAlias button) { if (button.GetHoldable() > 0 && _holdTimes.ContainsKey(button.GetAssociation()) && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) > 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { return(false); } return(true); }
private bool isHoldable(ButtonAlias button) { if (button.GetHoldable() == 0) { return(true); } return(false); }
private bool isHoldableButNotHeldEnough(ButtonAlias button) { if (button.GetHoldable() > 0 && !_holdTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Add(button.GetAssociation(), SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds + button.GetHoldable()); return(false); } return(true); }
private void RemoveLocksAndHolds(ButtonAlias button) { if (_holdTimes.ContainsKey(button.GetAssociation()) && button.GetHoldable() > 0 && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (_repeatHoldTimes.ContainsKey(button.GetAssociation()) && _repeatHoldTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0) { _repeatHoldTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (!_holdTimes.ContainsKey(button.GetAssociation())) { _buttonLocks.Remove(button.GetAssociation()); } }
private bool checkCommandKeyUp(ButtonAlias button) { if (_keyState.IsKeyUp(button.GetKey()) && _buttonLocks.ContainsValue(button)) { if (_holdTimes.ContainsKey(button.GetAssociation()) && button.GetHoldable() > 0 && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (_repeatHoldTimes.ContainsKey(button.GetAssociation()) && _repeatHoldTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0) { _repeatHoldTimes.Remove(button.GetAssociation()); } else if (!_holdTimes.ContainsKey(button.GetAssociation())) { _buttonLocks.Remove(button.GetAssociation()); } return(false); } return(true); }
private void RemoveLocksAndHolds(ButtonAlias button) { if (_holdTimes.ContainsKey(button.GetAssociation()) && button.GetHoldable() > 0 && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (_repeatHoldTimes.ContainsKey(button.GetAssociation()) && _repeatHoldTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0) { _repeatHoldTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (!_holdTimes.ContainsKey(button.GetAssociation())) { _buttonLocks.Remove(button.GetAssociation()); } }
private bool isHoldableButNotHeldEnough(ButtonAlias button) { if (button.GetHoldable() > 0 && !_holdTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Add(button.GetAssociation(), SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds + button.GetHoldable()); return false; } return true; }
private bool isHoldable(ButtonAlias button) { if (button.GetHoldable() == 0) { return true; } return false; }
private bool checkCommandKeyUp(ButtonAlias button) { if (_keyState.IsKeyUp(button.GetKey()) && _buttonLocks.ContainsValue(button)) { if (_holdTimes.ContainsKey(button.GetAssociation()) && button.GetHoldable() > 0 && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { _holdTimes.Remove(button.GetAssociation()); _buttonLocks.Remove(button.GetAssociation()); } else if (_repeatHoldTimes.ContainsKey(button.GetAssociation()) && _repeatHoldTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) < 0) { _repeatHoldTimes.Remove(button.GetAssociation()); } else if (!_holdTimes.ContainsKey(button.GetAssociation())) { _buttonLocks.Remove(button.GetAssociation()); } return false; } return true; }
private bool buttonNotHeldEnough(ButtonAlias button) { if (button.GetHoldable() > 0 && _holdTimes.ContainsKey(button.GetAssociation()) && _holdTimes[button.GetAssociation()].CompareTo(SystemMain.CurrentGameTime.TotalRealTime.TotalSeconds) > 0 && !_repeatHoldTimes.ContainsKey(button.GetAssociation())) { return false; } return true; }