public abstract class BackgroundElementRastered extends BackgroundElement
Constructor and Description |
---|
BackgroundElementRastered(int mainX,
int mainY,
Sprite sprite,
int rastersNumber)
Create a rastered background element.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addRaster(Sprite sprite,
int fr,
int fg,
int fb)
Add a raster with specified color code.
|
Sprite |
getRaster(int id)
Get raster surface from its id.
|
protected abstract void |
load(Sprite sprite,
int rastersNumber)
Load rasters from original sprite.
|
getMainX, getMainY, getOffsetX, getOffsetY, getRenderable, setMainX, setMainY, setOffsetX, setOffsetY
public BackgroundElementRastered(int mainX, int mainY, Sprite sprite, int rastersNumber)
mainX
- The main location x.mainY
- The main location y.sprite
- The sprite to be rastered.rastersNumber
- The number of rasters.protected abstract void load(Sprite sprite, int rastersNumber)
sprite
- The original sprite.rastersNumber
- The number of rasters to use.public Sprite getRaster(int id)
id
- The raster id.protected void addRaster(Sprite sprite, int fr, int fg, int fb)
sprite
- The original sprite.fr
- The red color offset.fg
- The green color offset.fb
- The blue color offset.LionEngineException
- If arguments are invalid.Copyright © 2016 Byron 3D Games Studio. All rights reserved.