2d_patformer/platform.cpp
2025-09-24 14:22:47 +00:00

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();}