Package sk.tuke.kpi.gamelib.map
Interface SceneMap
-
- All Known Implementing Classes:
EmptyMap
,TiledSceneMap
public interface SceneMap
Map defining scene environment.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getGridWidth
int getGridWidth()
- Returns:
- width of the map tile grid (unit: tile)
-
getGridHeight
int getGridHeight()
- Returns:
- height of the map tile grid (unit: tile)
-
getTileWidth
int getTileWidth()
- Returns:
- width of a single tile (unit: pixel)
-
getTileHeight
int getTileHeight()
- Returns:
- height of a single tile (unit: pixel)
-
getActorObjects
@NotNull @NotNull java.util.Collection<ActorMapObject> getActorObjects()
- Returns:
actor objects
defined by the map
-
getMarkers
@NotNull @NotNull java.util.Map<java.lang.String,MapMarker> getMarkers()
- Returns:
map markers
mapped by theirnames
-
getOverlay
@NotNull @NotNull Overlay getOverlay()
- Returns:
- map overlay layer
-
getTile
@NotNull @NotNull MapTile getTile(int tileX, int tileY)
Gets a tile at specified grid position.- Parameters:
tileX
- x position of the tile in gridtileY
- y position of the tile in grid- Returns:
- tile at specified grid position
-
intersectsWithWall
boolean intersectsWithWall(@NotNull @NotNull Actor actor)
- Parameters:
actor
- actor to check for intersection- Returns:
- true if the specified actor intersects with a wall in the map
-
render
void render(float deltaTime)
Renders the map.- Parameters:
deltaTime
- time passed from since the previous render
-
-