mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-06 19:22:20 +00:00
lobby: add background tiles with color code
This commit is contained in:
@@ -359,7 +359,11 @@ namespace BBM
|
||||
entity.getComponent<Drawable2DComponent>().drawable->setColor(ORANGE);
|
||||
});
|
||||
|
||||
static const std::vector<RAY::Color> colors = { BLUE, RED, GREEN, YELLOW };
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto &playerTile = scene->addEntity("player tile")
|
||||
.addComponent<PositionComponent>(224 * (i + 1) + 200 * i, 1080 / 3, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Rectangle>(RAY::Vector2(224 * (i + 1) + 200 * i, 1080 / 3), RAY::Vector2(200, 200), colors[i]);
|
||||
auto &player = scene->addEntity("player")
|
||||
.addComponent<PositionComponent>(224 * (i + 1) + 200 * i, 1080 / 3, 0)
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/player/icons/none.png");
|
||||
|
||||
Reference in New Issue
Block a user