|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.map.GameMap
org.deken.game.map.FreeStyleMap
public class FreeStyleMap
Title: FreeStyleMap
Description: A FreeStyleMap uses no tiles, but is a simple free form area for the game.
Copyright: Copyright (c) Dec 12, 2010
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deken.game.map.GameMap |
---|
GameMap.QUEUE |
Field Summary |
---|
Fields inherited from class org.deken.game.map.GameMap |
---|
background, collisionMap, components, layout, mapRenderer, mapSize, updateables |
Constructor Summary | |
---|---|
FreeStyleMap(int width,
int height)
Creates a FreeStyleMap given the height and width, that has no specific grid size. |
|
FreeStyleMap(MapSize mapSize)
Creates a FreeStyleMap based on the MapSize. |
Method Summary | |
---|---|
void |
addSection(Section section,
GameLocation gameLocation)
Add a Section to the specified location. |
void |
addSprite(Sprite sprite,
GameLocation gameLocation)
Add a sprite to the specified location. |
Sprite |
addSpriteCopy(Sprite sprite,
GameLocation gameLocation)
Add a copy of the sprite to the specified location. |
Decor |
addTile(Decor decor,
GameLocation gameLocation)
This simply calls addSprite. |
Decor |
addTile(Decor decor,
GameLocation gameLocation,
boolean placeHolder,
boolean nonTileCollision)
This simply calls addSprite |
Actor |
getPlayer()
Gets the player Sprite. |
java.util.Collection<Sprite> |
getSprites()
Returns the list of all moving sprites. |
MapElement |
getTile(int x,
int y,
int z)
Returns the MapElement at the map grid location. |
boolean |
removeSprite(Sprite sprite)
|
Decor |
removeTile(GameLocation gameLocation)
|
void |
setCollisionMap(CollisionMap collisionMap)
|
void |
setKeepOnMap(boolean keepOnMap)
|
void |
setPlayer(Actor player,
GameLocation gameLocation)
Sets the player Sprite. |
void |
update(long elapseTime)
Update the elements in the GameMap. |
Methods inherited from class org.deken.game.map.GameMap |
---|
addComponents, addUpdateable, clearQueueComponents, draw, getActions, getBackground, getComponentByName, getComponents, getLayout, getMapSize, getName, removeComponent, setBackground, setLayout, setMapRenderer, setMapSize, setName, setScreenSize, setupPlayer, updateQueueComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FreeStyleMap(int width, int height)
width
- height
- public FreeStyleMap(MapSize mapSize)
mapSize
- Method Detail |
---|
public void addSection(Section section, GameLocation gameLocation)
GameMap
addSection
in class GameMap
section
- SectiongameLocation
- GameLocationpublic void addSprite(Sprite sprite, GameLocation gameLocation)
GameMap
addSprite
in class GameMap
sprite
- gameLocation
- public Sprite addSpriteCopy(Sprite sprite, GameLocation gameLocation)
GameMap
addSpriteCopy
in class GameMap
sprite
- gameLocation
-
public Decor addTile(Decor decor, GameLocation gameLocation)
addTile
in class GameMap
decor
- gameLocation
-
public Decor addTile(Decor decor, GameLocation gameLocation, boolean placeHolder, boolean nonTileCollision)
addTile
in class GameMap
decor
- gameLocation
- placeHolder
- nonTileCollision
-
public Actor getPlayer()
GameMap
getPlayer
in class GameMap
public java.util.Collection<Sprite> getSprites()
GameMap
getSprites
in class GameMap
public MapElement getTile(int x, int y, int z)
GameMap
getTile
in class GameMap
x
- inty
- intz
- int
public boolean removeSprite(Sprite sprite)
removeSprite
in class GameMap
public Decor removeTile(GameLocation gameLocation)
removeTile
in class GameMap
public void setCollisionMap(CollisionMap collisionMap)
setCollisionMap
in class GameMap
collisionMap
- CollisionMappublic void setKeepOnMap(boolean keepOnMap)
public void setPlayer(Actor player, GameLocation gameLocation)
GameMap
setPlayer
in class GameMap
player
- ActorgameLocation
- GameLocationpublic void update(long elapseTime)
GameMap
update
in interface Updateable
update
in class GameMap
elapseTime
- long
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |