AI for Games 1.1.1
|
Public Member Functions | |
PersonPic (PApplet papp) | |
PersonPic (PApplet papp, float size) | |
PersonPic (PApplet papp, float size, int bodyFill, int headFill, int stroke, float weight) | |
PersonPic | appearance (int bodyFill, int headFill, int stroke, float weight) |
void | bodyFill (int col) |
void | draw (BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY, float etime) |
![]() | |
PicturePS () | |
PicturePS (PApplet papp) | |
void | setApplet (PApplet app) |
![]() | |
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 () |
Private Member Functions | |
void | fillTriangle (int p1, int p2) |
Additional Inherited Members | |
![]() | |
PApplet | app = null |
![]() | |
int | hints = 0 |
A simple representation of a person viewed from above.
The drawing is more complicated so that it will work in all renderers.
game2dai.entityshapes.ps.PersonPic.PersonPic | ( | PApplet | papp | ) |
Create a person of size 10 with a white body, grey head and thin black border.
papp |
game2dai.entityshapes.ps.PersonPic.PersonPic | ( | PApplet | papp, |
float | size | ||
) |
Create a person of size 10 with a white body, grey head and thin black border.
papp | |
size | the overall size (|2x collision radius) |
game2dai.entityshapes.ps.PersonPic.PersonPic | ( | PApplet | papp, |
float | size, | ||
int | bodyFill, | ||
int | headFill, | ||
int | stroke, | ||
float | weight | ||
) |
Create a person of user defined size and colours.
papp | |
size | the overall size (|2x collision radius) |
bodyFill | shoulder colour |
headFill | head colour |
stroke | edge colour |
weight | edge thickness |
PersonPic game2dai.entityshapes.ps.PersonPic.appearance | ( | int | bodyFill, |
int | headFill, | ||
int | stroke, | ||
float | weight | ||
) |
Create a person of user defined size and colours.
bodyFill | shoulder colour |
headFill | head colour |
stroke | edge colour |
weight | edge thickness |
void game2dai.entityshapes.ps.PersonPic.bodyFill | ( | int | col | ) |
Sometimes you might only want to change the body colour.
col | new colour for body (shoulders) |
void game2dai.entityshapes.ps.PersonPic.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.