| 6 | } |
| 7 | |
| 8 | bool ToggleKey::isKeyPressed() |
| 9 | { |
| 10 | if (m_delayTimer.getElapsedTime().asSeconds() > 0.2) { |
| 11 | if (sf::Keyboard::isKeyPressed(m_key)) { |
| 12 | m_delayTimer.restart(); |
| 13 | return true; |
| 14 | } |
| 15 | } |
| 16 | return false; |
| 17 | } |
no outgoing calls
no test coverage detected