Finishing to rework the drawable system

This commit is contained in:
Zoe Roux
2021-06-02 16:22:26 +02:00
parent 09d8b1a90b
commit 88e086b272
3 changed files with 27 additions and 11 deletions
+3 -5
View File
@@ -41,12 +41,10 @@ namespace BBM
std::shared_ptr<WAL::Scene> loadGameScene()
{
// Drawable2DComponent cmp = Drawable2DComponent(Vector2f(), Vector2f(), RED);
auto scene = std::make_shared<WAL::Scene>();
// scene->addEntity("cube")
// .addComponent<PositionComponent>()
// .addComponent<Drawable2DComponent>(Vector2f(), Vector2f(10, 10), RED);
scene->addEntity("cube")
.addComponent<PositionComponent>()
.addComponent<Drawable2DComponent, RAY2D::Rectangle>(Vector2f(), Vector2f(10, 10), RED);
scene->addEntity("player")
.addComponent<PositionComponent>()
.addComponent<Drawable3DComponent, RAY3D::Model>("assets/player/player.iqm", std::make_pair(MAP_DIFFUSE, "assets/player/blue.png"));