project2D/Wall.cpp
//--------------------------------------------------------------------------------------
// Draw: A virtual function from entity to render (or "draw") objects to the screen.
//
// Param:
//		renderer2D: a pointer to Renderer2D for rendering objects to screen.
//--------------------------------------------------------------------------------------
A virtual function from entity to render (or "draw") objects to the screen.
Param:
renderer2D: a pointer to Renderer2D for rendering objects to screen.
A virtual function from entity to render ( or " draw " ) objects to the screen . Param : renderer2D : a pointer to Renderer2D for rendering objects to screen .
void Wall::Draw(Renderer2D* renderer2D)
{
	renderer2D->setRenderColour(1, 1, 0, 1);
	renderer2D->drawBox(GetPosition().x, GetPosition().y, size.x, size.y);
	renderer2D->setRenderColour(1, 1, 1, 1);
	renderer2D->drawLine(boundingBox.LowerLeft.x, boundingBox.LowerLeft.y, boundingBox.UpperRight.x, boundingBox.UpperRight.y, 10, 0);
}
void Wall :: Draw ( Renderer2D * renderer2D ) { renderer2D -> setRenderColour ( 1 , 1 , 0 , 1 ) ; renderer2D -> drawBox ( GetPosition ( ) . x , GetPosition ( ) . y , size . x , size . y ) ; renderer2D -> setRenderColour ( 1 , 1 , 1 , 1 ) ; renderer2D -> drawLine ( boundingBox . LowerLeft . x , boundingBox . LowerLeft . y , boundingBox . UpperRight . x , boundingBox . UpperRight . y , 10 , 0 ) ; }
Draw: A virtual function from entity to render (or "draw") objects to the screen.
Draw : A virtual function from entity to render ( or " draw " ) objects to the screen .
// Set the color. // Draw/Render the wall to screen. // Change color back to make sure only this object is yellow. // Draw the bounding box for the Walls.