public class MapTileCollisionRendererModel extends FeatureModel implements MapTileCollisionRenderer
Constructor and Description |
---|
MapTileCollisionRendererModel()
Create the map tile collision.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCollisionDraw()
Clear the cached collision image created with
MapTileCollisionRenderer.createCollisionDraw() . |
void |
createCollisionDraw()
Create the collision draw surface.
|
static ImageBuffer |
createFunctionDraw(CollisionFormula collision,
int tw,
int th)
Create the function draw to buffer.
|
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 MapTileCollisionRendererModel()
The Services
must provide the following services:
public static ImageBuffer createFunctionDraw(CollisionFormula collision, int tw, int th)
collision
- The collision reference.tw
- The tile width.th
- The tile height.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 createCollisionDraw()
MapTileCollisionRenderer
createCollisionDraw
in interface MapTileCollisionRenderer
public void clearCollisionDraw()
MapTileCollisionRenderer
MapTileCollisionRenderer.createCollisionDraw()
.clearCollisionDraw
in interface MapTileCollisionRenderer
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.Copyright © 2016 Byron 3D Games Studio. All rights reserved.