Files
flappy-bird-bullet-hell/src/render.cpp
T
2026-07-09 00:27:26 +01:00

19 lines
492 B
C++

#include <render.hpp>
#include <components.hpp>
#include<raylib.h>
#include <entt/entt.hpp>
void update_render_system(entt::registry &registry){
auto view = registry.view<const Sprite, const Position>();
view.each([] (const auto &sprite, const auto &position){
if (sprite.texture){
DrawTexture(*(sprite.texture),position.x,position.y,WHITE);
}else{
DrawRectangle(position.x,position.y,50, 70,BLACK);
}
});
}