Originally Posted by
h3ro
Say I have a racing game where there are two teams. Team one are all using raceCar objects, team two are crapCars.
The two classes have all the normal move(), draw() and so one. They also have a variable to see how long the car has been on the track.
At the end of the game, I want to add up the total time all the raceCars have been on the track, and the total time all the crapCars have been on the track to see who was on the track the most. In order to add in into two different variables, I need to know which class the variable comes from.