Difference between revisions of "C++ Input & Movement"
(Created page with "=Keyboard Input= <syntaxhighlight lang=c++> if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left)) { // move left... } else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Righ...") |
(No difference)
|
Revision as of 13:13, 14 June 2019
Keyboard Input
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
{
// move left...
}
else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
{
// move right...
}
else if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{
// quit...
}