BeatTheStreet/src/player.cpp
//FloatRect function that returns a set of bounds used in determining if the player has contacted an obstacle.
FloatRect function that returns a set of bounds used in determining if the player has contacted an obstacle.
FloatRect function that returns a set of bounds used in determining if the player has contacted an obstacle .
sf::FloatRect Player::playerIntercectBounds()
{
		sf::FloatRect frPlayerGlobalBounds;
		frPlayerGlobalBounds.left = sPlayer.getGlobalBounds().left;
		frPlayerGlobalBounds.top = sPlayer.getGlobalBounds().top + 25;
		frPlayerGlobalBounds.width = sPlayer.getGlobalBounds().width;
		frPlayerGlobalBounds.height = sPlayer.getGlobalBounds().height - 50;
		return frPlayerGlobalBounds;
}
sf :: FloatRect Player :: playerIntercectBounds ( ) { sf :: FloatRect frPlayerGlobalBounds ; frPlayerGlobalBounds . left = sPlayer . getGlobalBounds ( ) . left ; frPlayerGlobalBounds . top = sPlayer . getGlobalBounds ( ) . top + 25 ; frPlayerGlobalBounds . width = sPlayer . getGlobalBounds ( ) . width ; frPlayerGlobalBounds . height = sPlayer . getGlobalBounds ( ) . height - 50 ; return frPlayerGlobalBounds ; }
FloatRect function that returns a set of bounds used in determining if the player has contacted an obstacle.
FloatRect function that returns a set of bounds used in determining if the player has contacted an obstacle .
//FloatRect that will be returned //Global bounds from the player sprite are taken and modified for the return FloatRect //FloatRect is returned