inital commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
|
||||
#include <render.hpp>
|
||||
#include <components.hpp>
|
||||
|
||||
#include<raylib.h>
|
||||
#include <entt/entt.hpp>
|
||||
|
||||
void update_render_system(entt::registry ®istry){
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user