public class ImageBank
extends java.lang.Object
Constructor and Description |
---|
ImageBank() |
Modifier and Type | Method and Description |
---|---|
static processing.core.PImage[] |
getImage(processing.core.PApplet app,
java.lang.String filename)
Load a bitmap file and return a reference to an array (size will be 1)
with the image as the sole frame.
|
static processing.core.PImage[] |
getImage(processing.core.PApplet app,
java.lang.String filename,
int nbrCols,
int nbrRows)
Load a bitmap file and create an array of PImages to represent a sequence of frames to flip
through when drawing.
|
public static processing.core.PImage[] getImage(processing.core.PApplet app, java.lang.String filename)
app
- the PApplet object (sketch)filename
- the name of the bitmap filepublic static processing.core.PImage[] getImage(processing.core.PApplet app, java.lang.String filename, int nbrCols, int nbrRows)
app
- the PApplet object (sketch)filename
- the name of the bitmap filenbrCols
- number of horizontal tiles in the imagenbrRows
- number of vertical tiles in the imageProcessing library AI_for_2D_Games by Peter Lager. (C) 2013