1
Graphics / Cannot Access Private Member in class "sf::NonCopyable&
« on: June 23, 2011, 03:18:58 am »
You're missing the break statements in your switch block. It should look like this:
Otherwise, if you press left, it will also run the code for right, up, and down.
Code: [Select]
case left:
object->Move(-5, 0);
break;
case right:
object->Move(5, 0);
break;
case up:
object->Move(0, -5);
break;
case down:
object->Move(0, 5);
break;
Otherwise, if you press left, it will also run the code for right, up, and down.