World(int worldWidth, int worldHeight, int cellSize, boolean bounded). The act method is called by the greenfoot framework to give actors a chance to. Get all the objects in the world, or all the objects of a particular class.

Author: Tojataur Zum
Country: Moldova, Republic of
Language: English (Spanish)
Genre: Technology
Published (Last): 12 September 2016
Pages: 24
PDF File Size: 19.11 Mb
ePub File Size: 2.40 Mb
ISBN: 168-8-38528-563-4
Downloads: 9592
Price: Free* [*Free Regsitration Required]
Uploader: Tojasar

If it is smaller than the world, it is tiled. Going Further There are greenfot more things you can do with Greenfoot, such as: True if there qpi an object of the given class type that intersects with the current object, false otherwise. This method is called by the Greenfoot system when the execution has stopped. Creates a RGB color with the specified red, green, blue values in the range 0 – Return the y-coordinate of the object’s current location.

Package greenfoot

Please visit the book’s web page for more information about this new edition. Subclasses can then define their own appearance and behaviour. An object of the given class type that intersects with the current object.


This utility class provides methods to control the simulation and interact with the system. Return all the objects gerenfoot intersect this object. List of objects of the given class type within the given radius.

Stop playing this sound if it is currently playing. Mirrors the image horizontally the left of the image becomes the right, and vice versa. Paint order is specified by class: Return the world’s background image.

If it is playing already, it will do nothing. This method does nothing. Objects of a class not explicitly specified inherit the act order from their superclass.

greenfoot (Greenfoot API)

World getWorld Return the world that this actor lives in. Move this actor the specified distance in the direction it is currently facing. The size of cells can be specified at world creation time, and is constant after creation. Construct a new world. True if the actor is at or beyond the edge cell of the world, and false otherwise. List of objects of the given class type that intersect with the current object. The default implementation does nothing.

Return all objects that intersect the center of the given location relative to this object’s location.


A list of all neighbours found. String toString Returns a string representation of this sound containing the name of apu file and whether it is currently playing or not.

All cells that can be reached in the number of steps given in ‘distance’ from this object are considered. The location is specified as the coordinates of a cell in the world.

Objects found can be restricted to a specific class and its subclasses by supplying the ‘cls’ parameter. The world, or null if this actor is not in a world. Rotation is expressed as a degree value, grrenfoot It should be overridden in subclasses to implement an world’s action. Objects of classes listed first in the parameter list will appear on top of all objects of classes listed later. Get all the objects in the world, or all the objects of a particular class.