timeElapsed is a static int of my RaceWorld. To implement a lap counter, I woud like to save it every time my car hits the startline. My problem in this case is that I can't save the time of RaceWorld as a new int. I would like to know how to save a static int of world in an actor class as a new int.
The timeElapsed static int in RaceWorld counts up, that works. I know that you could just put RaceWorld.timeElapsed instead of the time integer into the show Text method, but I would like to save certain times so I have to save it in a new integer of my cars class. In this case the showText method just shows that the time saving in int time doesn't work.
public class Car extends SmoothMover
{
int lap1;
int lap2;
int lap3;
int time = RaceWorld.timeElapsed;
public void act()
{
String showTime = time +"()()()";
getWorld().showText(showTime, 300, 300);
}
}

