AI for Games 1.1.1
|
Public Member Functions | |
Umbrella (PApplet papp, double size) | |
Umbrella (PApplet papp, double size, int[] colList) | |
void | setFill (int[] colList) |
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 () |
Package Attributes | |
float | radius = 0 |
Private Member Functions | |
void | fillTriangle (int p1, int p2, int col) |
Private Attributes | |
int | nbrParts = 0 |
float[] | x = null |
float[] | y = null |
int[] | colors = null |
float | rot = 0 |
Additional Inherited Members | |
![]() | |
PApplet | app = null |
![]() | |
int | hints = 0 |
Creates a circular picture that looks like an umbrella from above.
game2dai.entityshapes.ps.Umbrella.Umbrella | ( | PApplet | papp, |
double | size | ||
) |
Create a simple 8 piece black and white umbrella
papp | |
size | (should equal the collision radius) |
game2dai.entityshapes.ps.Umbrella.Umbrella | ( | PApplet | papp, |
double | size, | ||
int[] | colList | ||
) |
Create an umbrella with at least 8 sections using the colour list.
papp | |
size | the radius of the umbrella (should equal the collision radius) |
colList | an array of colour values |
void game2dai.entityshapes.ps.Umbrella.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.
|
private |
Used to fill a triangle shape.
p1 | |
p2 | |
col |
void game2dai.entityshapes.ps.Umbrella.setFill | ( | int[] | colList | ) |
Set the colours to be used by the brolly.