public class ArrowPic extends PicturePS
Constructor and Description |
---|
ArrowPic(processing.core.PApplet papp)
Create an arrow 20 units long and 12 units at its thick end with a white body
and thin black border.
|
ArrowPic(processing.core.PApplet papp,
float length,
int fill,
int stroke,
float weight)
Create an arrow of user specified length and colours.
|
Modifier and Type | Method and Description |
---|---|
ArrowPic |
appearance(int fill,
int stroke,
float weight)
Cahneg the appearance of the arrow
|
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 ArrowPic(processing.core.PApplet papp)
papp
- public ArrowPic(processing.core.PApplet papp, float length, int fill, int stroke, float weight)
papp
- length
- the length of the arrowfill
- the fill colourstroke
- the border colourweight
- the border thicknessspublic 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 ArrowPic appearance(int fill, int stroke, float weight)
fill
- the fill colourstroke
- the border colourweight
- the border thicknesssProcessing library AI_for_2D_Games by Peter Lager. (C) 2013