gameEngine/gameEngine/Sprite.cpp
//if visible true, draw sprite, draw collider(s) if collideDebug true.
if visible true, draw sprite, draw collider(s) if collideDebug true.
if visible true draw sprite draw collider ( s ) if collideDebug true .
void Sprite::Draw(SpriteRenderer &renderer)
{
	if (visible)
	{
		Texture2D tempTexture = this->getTexture();
		renderer.DrawSprite(tempTexture, this->Position, this->getSize(), this->getRotation(), this->getColor(), this->transparency);
	}
	if (collideDebug)
	{
		for (int i = 0; i < colliders_.size(); i++)
		{
			colliders_.at(i)->Draw(renderer);
		}
	}
}
void Sprite :: Draw ( SpriteRenderer & renderer ) { if ( visible ) { Texture2D tempTexture = this -> getTexture ( ) ; renderer . DrawSprite ( tempTexture , this -> Position , this -> getSize ( ) , this -> getRotation ( ) , this -> getColor ( ) , this -> transparency ) ; } if ( collideDebug ) { for ( int i = 0 ; i < colliders_ . size ( ) ; i ++ ) { colliders_ . at ( i ) -> Draw ( renderer ) ; } } }
if visible true, draw sprite, draw collider(s) if collideDebug true.
if visible true draw sprite draw collider ( s ) if collideDebug true .
//check if collideDebug is true, if so draw all colliders