public class BitmapPic extends PicturePS
Constructor and Description |
---|
BitmapPic(processing.core.PApplet papp,
java.lang.String fname)
Single image for all frames
|
BitmapPic(processing.core.PApplet papp,
java.lang.String fname,
int nCols,
int nRows)
An animated image.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(BaseEntity owner,
float posX,
float posY,
float velX,
float velY,
float headX,
float headY,
float etime)
Draw the entity.
|
void |
pauseAnimation() |
void |
setAnimation(double interval,
int dir) |
addHints, draw, getHints, removeAllHints, removeHints, showHints
public BitmapPic(processing.core.PApplet papp, java.lang.String fname)
papp
- fname
- the name of the bitmap image filepublic BitmapPic(processing.core.PApplet papp, java.lang.String fname, int nCols, int nRows)
papp
- fname
- the name of the bitmap image filenCols
- number of tiles horizontallynRows
- number of rows verticallypublic void draw(BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY, float etime)
draw
in class Picture
owner
- the entity that owns this renderer.posX
- real world position (x)posY
- real world position (x)velX
- magnitude of the velocity vector in the x directionvelY
- magnitude of the velocity vector in the y directionheadX
- magnitude of the heading vector in the x directionheadY
- magnitude of the heading vector in the y directionetime
- the elapsed time in seconds since last updatepublic void setAnimation(double interval, int dir)
public void pauseAnimation()
Processing library AI_for_2D_Games by Peter Lager. (C) 2013