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

Public Member Functions

 BuildingPic (PApplet papp)
 
 BuildingPic (PApplet papp, int fill, int stroke, float weight)
 
BuildingPic appearance (float size, int fill, int stroke, float weight)
 
BuildingPic fill (int col)
 
BuildingPic stroke (int col)
 
BuildingPic strokeWeight (float w)
 
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

Vector2D[] contour = null
 
Integer[] triangle = null
 
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

Simple solid colour picture to represent a building.

Author
Peter Lager

Constructor & Destructor Documentation

◆ BuildingPic() [1/2]

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

Simple black and white with thin border design.

Parameters
papp

◆ BuildingPic() [2/2]

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

Use specified design.

Parameters
papp
fillthe fill colour
strokethe border colour
weightthe border thickness

Member Function Documentation

◆ appearance()

BuildingPic game2dai.entityshapes.ps.BuildingPic.appearance ( float  size,
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.BuildingPic.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.

◆ fill()

BuildingPic game2dai.entityshapes.ps.BuildingPic.fill ( int  col)

Set the centre colour

◆ stroke()

BuildingPic game2dai.entityshapes.ps.BuildingPic.stroke ( int  col)

Set the border colour

◆ strokeWeight()

BuildingPic game2dai.entityshapes.ps.BuildingPic.strokeWeight ( float  w)

Set the border thickness


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