|
AI for Games 1.1.1
|

Public Member Functions | |
| BitmapPic (PApplet papp, String fname) | |
| BitmapPic (PApplet papp, String fname, int nCols, int nRows) | |
| void | draw (BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY, float etime) |
| void | setAnimation (double interval, int dir) |
| void | pauseAnimation () |
Public Member Functions inherited from game2dai.entityshapes.ps.PicturePS | |
| PicturePS () | |
| PicturePS (PApplet papp) | |
| void | setApplet (PApplet app) |
Public Member Functions inherited from game2dai.entityshapes.Picture | |
| Picture () | |
| void | draw (BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY) |
| void | draw (BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY, float elapsedTime) |
| void | showHints (int hints) |
| void | addHints (int hints) |
| void | removeHints (int hints) |
| void | removeAllHints () |
| int | getHints () |
Package Attributes | |
| PImage[] | img |
| final int | FORWARD = 1 |
| final int | PAUSE = 0 |
| final int | REVERSE = -1 |
| double | timeToChangeFrame = 0 |
| double | intervalTime = 0 |
| int | dir = PAUSE |
| int | interval = 0 |
| int | frameNo = 0 |
Additional Inherited Members | |
Protected Attributes inherited from game2dai.entityshapes.ps.PicturePS | |
| PApplet | app = null |
Protected Attributes inherited from game2dai.entityshapes.Picture | |
| int | hints = 0 |
A single image or a sprite sheet is used to render the entity. If a sprite sheet is used then they can be used to animate the rendered entity.
| game2dai.entityshapes.ps.BitmapPic.BitmapPic | ( | PApplet | papp, |
| String | fname | ||
| ) |
Single image for all frames
| papp | |
| fname | the name of the bitmap image file |
| game2dai.entityshapes.ps.BitmapPic.BitmapPic | ( | PApplet | papp, |
| String | fname, | ||
| int | nCols, | ||
| int | nRows | ||
| ) |
An animated image.
The image frames are stored as tiles within a single image
| papp | |
| fname | the name of the bitmap image file |
| nCols | number of tiles horizontally |
| nRows | number of rows vertically |
| void game2dai.entityshapes.ps.BitmapPic.draw | ( | BaseEntity | owner, |
| float | posX, | ||
| float | posY, | ||
| float | velX, | ||
| float | velY, | ||
| float | headX, | ||
| float | headY, | ||
| float | etime | ||
| ) |
Draw the entity.
| 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 direction |
| velY | magnitude of the velocity vector in the y direction |
| headX | magnitude of the heading vector in the x direction |
| headY | magnitude of the heading vector in the y direction |
| etime | the elapsed time in seconds since last update |
Reimplemented from game2dai.entityshapes.Picture.