I have a Camera Class that has an x and y of the viewing offset that I drag around with the mouse. I also wanted to start following players (at the start of their turn) and then follow projectiles when they are created (all these classes have an x and y as well). So, I thought that I could just make an Object named following:
Object following;
and then set it to camera, player1, rocket, etc… and then use it like:
g.translate(following.x, following.y);
but it don’t seem to work like that. Anyone got a sneaky little trick like that, that does work?