This site requires JavaScript, please enable it in your browser!
Greenfoot back
AngelusNeko13
AngelusNeko13 wrote ...

2015/10/22

How do I counters increase through time?

AngelusNeko13 AngelusNeko13

2015/10/22

#
okay for this one i dont have a cod but i already have a counter set up, can anyone please show me how to make counters increase through time?
Super_Hippo Super_Hippo

2015/10/22

#
Just increase the variable in the act method.
private int time = 0;

public void act()
{
    time++;
}
AngelusNeko13 AngelusNeko13

2015/10/22

#
thanks super :) it helped alot
You need to login to post a reply.