1
General / Avoid Repeating Input-Events
« on: December 09, 2011, 08:15:21 pm »
Hi,
I have following problem in this Code:
the sprite just shall go one time down, but if i write this into the code:
the Window crashes because of an infinity loop.
I hope you know the answear
I have following problem in this Code:
Quote
if(Window.GetInput().IsKeyDown(sf::Key::Down))
{
Sprite.Move(0,100 * ElapsedTime);
}
the sprite just shall go one time down, but if i write this into the code:
Quote
while( Window.GetInput().IsKeyDown(sf::Key::Down) )
the Window crashes because of an infinity loop.
I hope you know the answear