Appendix B. Greenfoot API
The Greenfoot API consists of five classes:
Actor | Actor methods are available to all actor subclasses. |
World | World methods are available to the world. |
Greenfoot | Used to communicate with the Greenfoot environment itself. |
MouseInfo | Provides information about the last mouse event. |
GreenfootImage | For image presentation and manipulation. |
Class World | |
---|---|
| Construct a new world. |
| Act method for the world. Called once per act round. |
| Add an Actor to the world. |
| Return the world’s background image. |
| Return the size of a cell (in pixels). |
| Return the color at the center of the ... |
Get Introduction to Programming with Greenfoot: Object–Oriented Programming in Java™ with Games and Simulations, First Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.