public class PersonPic extends PicturePS
Constructor and Description |
---|
PersonPic(processing.core.PApplet papp)
Create a person of size 10 with a white body, grey head and thin black border.
|
PersonPic(processing.core.PApplet papp,
float size)
Create a person of size 10 with a white body, grey head and thin black border.
|
PersonPic(processing.core.PApplet papp,
float size,
int bodyFill,
int headFill,
int stroke,
float weight)
Create a person of user defined size and colours.
|
Modifier and Type | Method and Description |
---|---|
PersonPic |
appearance(int bodyFill,
int headFill,
int stroke,
float weight)
Create a person of user defined size and colours.
|
void |
bodyFill(int col)
Sometimes you might only want to change the body colour.
|
void |
draw(BaseEntity owner,
float posX,
float posY,
float velX,
float velY,
float headX,
float headY,
float etime)
Draw the entity.
|
addHints, draw, getHints, removeAllHints, removeHints, showHints
public PersonPic(processing.core.PApplet papp)
papp
- public PersonPic(processing.core.PApplet papp, float size)
papp
- size
- the overall size (|2x collision radius)public PersonPic(processing.core.PApplet papp, float size, int bodyFill, int headFill, int stroke, float weight)
papp
- size
- the overall size (|2x collision radius)bodyFill
- shoulder colourheadFill
- head colourstroke
- edge colourweight
- edge thicknesspublic PersonPic appearance(int bodyFill, int headFill, int stroke, float weight)
bodyFill
- shoulder colourheadFill
- head colourstroke
- edge colourweight
- edge thicknesspublic void bodyFill(int col)
col
- new colour for body (shoulders)public 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 updateProcessing library AI_for_2D_Games by Peter Lager. (C) 2013