void AttackPaddle::moveBody() { if(sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Left)) { if(LeftX() > 0 ) { body.move(-8.f,0.f); } } if(sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Right)) { if(RightX() < plateWidth ) { body.move(8.f,0.f); } } }
bool GamepadF310::AnyStickPressed() { return fabs(LeftX()) > AXIS_THRESHOLD || fabs(LeftY()) > AXIS_THRESHOLD || fabs(RightX()) > AXIS_THRESHOLD || fabs(RightY()) > AXIS_THRESHOLD; }