| 12 | } |
| 13 | |
| 14 | void Toggle::checkInput() |
| 15 | { |
| 16 | if (m_toggleDelay.asMilliseconds() < |
| 17 | m_toggleTimer.getElapsedTime().asMilliseconds()) |
| 18 | { |
| 19 | if (sf::Keyboard::isKeyPressed(m_toggleKey)) |
| 20 | { |
| 21 | m_isToogleOn = !m_isToogleOn; |
| 22 | m_toggleTimer.restart(); |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | Toggle_Bool::Toggle_Bool(sf::Keyboard::Key key, sf::Time delay, bool& value) |
| 28 | : m_toggleKey (key) |
nothing calls this directly
no outgoing calls
no test coverage detected