public class MapTileRasteredModel extends FeatureModel implements MapTileRastered
Constructor and Description |
---|
MapTileRasteredModel()
Create a map tile rastered.
|
Modifier and Type | Method and Description |
---|---|
int |
getRasterIndex(int ty)
Get raster index from input tile (depending of its height).
|
SpriteTiled |
getRasterSheet(Integer sheet,
int rasterIndex)
Get a tilesheet from its sheet and raster index.
|
void |
loadSheets(Media rasterConfig,
boolean smooth)
Load tile sheets as rastered.
|
void |
prepare(FeatureProvider provider,
Services services)
Prepare the feature.
|
void |
renderTile(Graphic g,
MapTile map,
Tile tile,
int x,
int y)
Render tile on its designed location.
|
checkListener, getFeature, getFeatures, getFeaturesType, hasFeature
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkListener
getFeature, getFeatures, getFeaturesType, hasFeature
public void prepare(FeatureProvider provider, Services services)
Feature
Services
are required.prepare
in interface Feature
prepare
in class FeatureModel
provider
- The owner reference.services
- The services reference.public void loadSheets(Media rasterConfig, boolean smooth)
MapTileRastered
loadSheets
in interface MapTileRastered
rasterConfig
- The raster file that define the colors.smooth
- true
for a smoothed raster (may be slower), false
else.public void renderTile(Graphic g, MapTile map, Tile tile, int x, int y)
MapTileRenderer
renderTile
in interface MapTileRenderer
g
- The graphic output.map
- The map used.tile
- The tile to render.x
- The location x.y
- The location y.public int getRasterIndex(int ty)
MapTileRastered
getRasterIndex
in interface MapTileRastered
ty
- The vertical tile location in tile.public SpriteTiled getRasterSheet(Integer sheet, int rasterIndex)
MapTileRastered
getRasterSheet
in interface MapTileRastered
sheet
- The sheet numberrasterIndex
- The raster index.Copyright © 2016 Byron 3D Games Studio. All rights reserved.