AI for Games 1.1.1
Loading...
Searching...
No Matches
game2dai.entityshapes.ps.CirclePic Class Reference
Inheritance diagram for game2dai.entityshapes.ps.CirclePic:

Public Member Functions

 CirclePic (PApplet papp)
 
 CirclePic (PApplet papp, float size, int fill, int stroke, float weight)
 
CirclePic appearance (int fill, int stroke, float weight)
 
void draw (BaseEntity owner, float posX, float posY, float velX, float velY, float headX, float headY, float etime)
 
- 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 ()
 

Private Attributes

float diam = 10
 
int fillCol
 
int strokeCol
 
float strokeWeight
 

Additional Inherited Members

- Protected Attributes inherited from game2dai.entityshapes.ps.PicturePS
PApplet app = null
 
- Protected Attributes inherited from game2dai.entityshapes.Picture
int hints = 0
 

Detailed Description

A simple circular picture with user defined size and colour.

Author
Peter Lager

Constructor & Destructor Documentation

◆ CirclePic() [1/2]

game2dai.entityshapes.ps.CirclePic.CirclePic ( PApplet  papp)

Create a white circle with a thin black border of size 10.

Parameters
papp

◆ CirclePic() [2/2]

game2dai.entityshapes.ps.CirclePic.CirclePic ( PApplet  papp,
float  size,
int  fill,
int  stroke,
float  weight 
)

Create a circle picture

Parameters
papp
sizethe diameter (2x collision radius)
fillthe fill colour
strokethe border colour
weightthe border thickness

Member Function Documentation

◆ appearance()

CirclePic game2dai.entityshapes.ps.CirclePic.appearance ( int  fill,
int  stroke,
float  weight 
)

Change the drawing factors.

Parameters
fillthe fill colour
strokethe border colour
weightthe border thickness

◆ draw()

void game2dai.entityshapes.ps.CirclePic.draw ( BaseEntity  owner,
float  posX,
float  posY,
float  velX,
float  velY,
float  headX,
float  headY,
float  etime 
)

Draw the entity.

Parameters
ownerthe entity that owns this renderer.
posXreal world position (x)
posYreal world position (x)
velXmagnitude of the velocity vector in the x direction
velYmagnitude of the velocity vector in the y direction
headXmagnitude of the heading vector in the x direction
headYmagnitude of the heading vector in the y direction
etimethe elapsed time in seconds since last update

Reimplemented from game2dai.entityshapes.Picture.


The documentation for this class was generated from the following file: