Here’s my issue. I have a paddle class and a ball class. Both have update, initialize, and draw methods. The issue is with my paddle class. I want to draw two paddles on the screen (each a different color), but the code I currently have doesn’t work correctly. The result is 4 paddles instead of two (basically two paddles, with two more underneath).
Here’s the code – http://paste2.org/p/1390842
And here’s a screenshot of the problem – http://img651.imageshack.us/img651/9092/pongshot.png
I’m unsure of what I’m doing wrong. Perhaps it’s a case of not being able to draw two different paddles? Should I make a second paddle class instead?
And here’s my Game1.cs file – http://paste2.org/p/1390854
And my Ball class – http://paste2.org/p/1390856
Inside your Intialize/Draw methods you are drawing two Paddles for one object. Change these to this:
Basically get rid of Paddle2 from the class. Since you are creating two instances of Paddle in Game1.cs you don’t need to have two draws inside paddle. That kind of defeats the purpose of data objects. Each instance that is inside your Game1.cs will call the Draw() method and they will draw themselves.