Hello everybody, I come with a simple question. I have a sprite that I want to scroll down to a certain part of the screen, and then stop. My problem is, that when I press the key to trigger the scrolling, it only does the action once. Here is the relevant code.
int moveBar(sf::Shape &Bar, sf::Clock &clockMovement, float &yRatio, float &mDelay, int &i)
{
while ( i != (yRatio/10) && (clockMovement.GetElapsedTime() > mDelay))
{
Bar.Move(0, 1);
i++;
clockMovement.Reset();
}
}
[/code]