+ 2
Why are some of the functions not working and how can I set the current position?
10 Respuestas
+ 3
You weren't changing the position correctly:
https://code.sololearn.com/W7Reu41fuUT6
Set the top and left to wherever you want to go from 1 to 299 each.
+ 3
yes. set a global pause flag and don't change anything in your frame functions while it is set. resume resets it and the move continues. To cancel a move, you could use another global that frame checks and clears the interval.
+ 3
updated my code to add pause function. hit button second time to resume. should update button label, but I'll leave that for you to figure out.
+ 3
N/p, good luck in coding!
+ 2
thank you very much
+ 2
Hello! I've modified your game code to fix bugs with flickering (when more than one direction pressed together) and to show more traditional way of moving game objects.
https://code.sololearn.com/WvlkhOmlbWjk/?ref=app
+ 2
thank you very much
+ 2
thank you
+ 1
is it possible to add functions to pause?
+ 1
syntax?