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

2015/10/20

Act Method

chanmw196 chanmw196

2015/10/20

#
What does an act method do?
danpost danpost

2015/10/20

#
The act method is called by the greenfoot framework on all active objects while the scenario is running. This includes the act method of the active world and the act method of every actor object within that world. It is the initial "loop" that animates your world. The code you place within these act method are what you want these objects to do during any cycles of act methods. One complete set of act method calls (for the active world and all actors in that world) is called an act cycle (aka frame). Greenfoot controls the delay between act cycles to regulate the speed of the scenario which can be adjusted by changing the speed slider. At normal speed (about the middle of the slider), about 55 to 60 frames are executed per second.
You need to login to post a reply.