Package sk.tuke.kpi.gamelib.map
Class EmptyMap
- java.lang.Object
-
- sk.tuke.kpi.gamelib.map.EmptyMap
-
-
Field Summary
Fields Modifier and Type Field Description static int
TILE_SIZE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.util.Collection<ActorMapObject>
getActorObjects()
int
getGridHeight()
int
getGridWidth()
@NotNull java.util.Map<java.lang.String,MapMarker>
getMarkers()
@NotNull Overlay
getOverlay()
@NotNull MapTile
getTile(int tileX, int tileY)
Gets a tile at specified grid position.int
getTileHeight()
int
getTileWidth()
boolean
intersectsWithWall(@NotNull Actor actor)
void
render(float deltaTime)
Renders the map.
-
-
-
Field Detail
-
TILE_SIZE
public static final int TILE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EmptyMap
public EmptyMap(@NotNull @NotNull Scene scene)
-
-
Method Detail
-
getGridWidth
public int getGridWidth()
- Specified by:
getGridWidth
in interfaceSceneMap
- Returns:
- width of the map tile grid (unit: tile)
-
getGridHeight
public int getGridHeight()
- Specified by:
getGridHeight
in interfaceSceneMap
- Returns:
- height of the map tile grid (unit: tile)
-
getTileWidth
public int getTileWidth()
- Specified by:
getTileWidth
in interfaceSceneMap
- Returns:
- width of a single tile (unit: pixel)
-
getTileHeight
public int getTileHeight()
- Specified by:
getTileHeight
in interfaceSceneMap
- Returns:
- height of a single tile (unit: pixel)
-
getActorObjects
@NotNull public @NotNull java.util.Collection<ActorMapObject> getActorObjects()
- Specified by:
getActorObjects
in interfaceSceneMap
- Returns:
actor objects
defined by the map
-
getMarkers
@NotNull public @NotNull java.util.Map<java.lang.String,MapMarker> getMarkers()
- Specified by:
getMarkers
in interfaceSceneMap
- Returns:
map markers
mapped by theirnames
-
getOverlay
@NotNull public @NotNull Overlay getOverlay()
- Specified by:
getOverlay
in interfaceSceneMap
- Returns:
- map overlay layer
-
getTile
@NotNull public @NotNull MapTile getTile(int tileX, int tileY)
Description copied from interface:SceneMap
Gets a tile at specified grid position.
-
intersectsWithWall
public boolean intersectsWithWall(@NotNull @NotNull Actor actor)
- Specified by:
intersectsWithWall
in interfaceSceneMap
- Parameters:
actor
- actor to check for intersection- Returns:
- true if the specified actor intersects with a wall in the map
-
-