destroy and reinitialize object
Posted: April 19th, 2017, 4:47 am
Hey,
so just starting out and have gone through lesson 12 or so and stopped to try and make a version of pong with what i have learned so far.
I have made a ball class and initialize at the beginning of the file and can draw the file with ball.draw(gfx); bounce it off the walls and paddles ect..
my problem is I can't seem to figure out how to destroy the ball object. I mean I can just stop drawing it but x & y keep updating and I can't seen to create another ball at the original settings.
any ideas?
Thanks for your time
so just starting out and have gone through lesson 12 or so and stopped to try and make a version of pong with what i have learned so far.
I have made a ball class and initialize at the beginning of the file and can draw the file with ball.draw(gfx); bounce it off the walls and paddles ect..
my problem is I can't seem to figure out how to destroy the ball object. I mean I can just stop drawing it but x & y keep updating and I can't seen to create another ball at the original settings.
any ideas?
Thanks for your time