Score for game pong

I

Isa

Guest
I am making the game Pong and when there is a collision with one of my paddles, the score has to be +1
Does someone the code for doing this?
I already made a controller for the score but what code does I have to make??
 

FrostyCat

Redemption Seeker
Is it normal these days for tutorials to not even teach how to add into a variable or handle them in general?

Assume that the controller is called obj_controller, and you set up its variables like this:
Code:
pointsA = 0;
pointsB = 0;
Then you do this in the paddle's collision with the ball:
Code:
obj_controller.pointsB += 1;
 
Top