public interface Drawable
Modifier and Type | Field and Description |
---|---|
static Drawable |
DRAWABLE
Drawable factory.
|
Modifier and Type | Method and Description |
---|---|
Animation |
createAnimation(int firstFrame,
int lastFrame,
float speed,
boolean reverse,
boolean repeat)
Create an Animation, which can be read by an AnimatedSprite (minimum frame is 1).
|
Animator |
createAnimator()
Create an animation player, which we will be able to play an animation data container.
|
Text |
createText(java.lang.String filename,
int size,
int style)
Create a font, which supports screen output text.
|
AnimatedSprite |
loadAnimatedSprite(java.awt.image.BufferedImage surface,
int horizontalFrames,
int verticalFrames)
Create an animated sprite using an image as reference, giving horizontal and vertical frames, filter and rendering mode.
|
AnimatedSprite |
loadAnimatedSprite(java.lang.String filename,
int horizontalFrames,
int verticalFrames)
Load an AnimatedSprite from a file, giving horizontal and vertical frames, filter and rendering mode.
|
Image |
loadImage(java.lang.String filename)
Load an Image from a file.
|
ParallaxedSprite |
loadParallaxedSprite(java.lang.String filename,
int numberOfLines,
int sx,
int sy)
Load a ParallaxedSprite, for parallax effect.
|
Sprite |
loadSprite(java.lang.String filename)
Load a Sprite from a file, with filter and rendering mode.
|
TiledSprite |
loadTiledSprite(java.awt.image.BufferedImage surface,
int tileWidth,
int tileHeight)
Create a TiledSprite using an image reference, giving tile dimension, filter and rendering mode.
|
TiledSprite |
loadTiledSprite(java.lang.String filename,
int tileWidth,
int tileHeight)
Load a TiledSprite from a file, giving tile dimension, filter and rendering mode.
|
static final Drawable DRAWABLE
Image loadImage(java.lang.String filename)
filename
- file name.Sprite loadSprite(java.lang.String filename)
filename
- file name.AnimatedSprite loadAnimatedSprite(java.lang.String filename, int horizontalFrames, int verticalFrames)
filename
- file name.horizontalFrames
- number of horizontal frames.verticalFrames
- number of vertical frames.AnimatedSprite loadAnimatedSprite(java.awt.image.BufferedImage surface, int horizontalFrames, int verticalFrames)
surface
- image reference.horizontalFrames
- number of horizontal frames.verticalFrames
- number of vertical frames.TiledSprite loadTiledSprite(java.lang.String filename, int tileWidth, int tileHeight)
filename
- file name.tileWidth
- tile width.tileHeight
- tile height.TiledSprite loadTiledSprite(java.awt.image.BufferedImage surface, int tileWidth, int tileHeight)
surface
- image reference.tileWidth
- tile width.tileHeight
- tile height.ParallaxedSprite loadParallaxedSprite(java.lang.String filename, int numberOfLines, int sx, int sy)
filename
- file name.numberOfLines
- number of parallax lines.sx
- starting width.sy
- starting height.Animation createAnimation(int firstFrame, int lastFrame, float speed, boolean reverse, boolean repeat)
firstFrame
- first frame.lastFrame
- last frame.speed
- animation speed.reverse
- true if animation is reversable.repeat
- repeat state (loop).Animator createAnimator()
Text createText(java.lang.String filename, int size, int style)
filename
- file name.size
- font size.style
- font style.