15 lines
352 B
C++
15 lines
352 B
C++
|
|
#include "platform.hpp"
|
|
|
|
Platform::Platform(float x , float y, float width, float height)
|
|
:shape(sf::Vector2f(width, height))
|
|
{
|
|
shape.setPosition(x ,y);
|
|
shape.setFillColor(sf::Color::Blue);
|
|
}
|
|
|
|
void Platform::draw(sf::RenderWindow& window){
|
|
window.draw(shape);
|
|
}
|
|
sf::FloatRect Platform::getBounds() const {
|
|
return shape.getGlobalBounds();}
|