public class TileMap
extends java.lang.Object
Constructor and Description |
---|
TileMap(int width,
int height)
Creates a new TileMap with the specified width and height (in number of
tiles) of the map.
|
Modifier and Type | Method and Description |
---|---|
void |
addSprite(OdorWorldEntity sprite)
Adds a OdorWorldEntity object to this map.
|
int |
getHeight()
Gets the height of this TileMap (number of tiles down).
|
java.util.Iterator |
getSprites()
Gets an Iterator of all the Sprites in this map, excluding the player
OdorWorldEntity.
|
java.awt.Image |
getTile(int x,
int y)
Gets the tile at the specified location.
|
int |
getWidth()
Gets the width of this TileMap (number of tiles across).
|
void |
removeSprite(OdorWorldEntity sprite)
Removes a OdorWorldEntity object from this map.
|
void |
setTile(int x,
int y,
java.awt.Image tile)
Sets the tile at the specified location.
|
public TileMap(int width, int height)
width
- height
- public int getWidth()
public int getHeight()
public java.awt.Image getTile(int x, int y)
x
- y
- public void setTile(int x, int y, java.awt.Image tile)
x
- y
- tile
- public void addSprite(OdorWorldEntity sprite)
sprite
- public void removeSprite(OdorWorldEntity sprite)
sprite
- public java.util.Iterator getSprites()