From de767e684d25096b4c0e3a4846ec0080063ab2d3 Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Tue, 15 Jun 2021 11:38:44 +0200 Subject: [PATCH] add tiles to score scene --- sources/Runner/ScoreScene.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sources/Runner/ScoreScene.cpp b/sources/Runner/ScoreScene.cpp index 90368250..d7edcfab 100644 --- a/sources/Runner/ScoreScene.cpp +++ b/sources/Runner/ScoreScene.cpp @@ -19,6 +19,9 @@ namespace BBM static const std::map sounds = { {SoundComponent::JUMP, "assets/sounds/click.ogg"} }; + static const std::vector tilesColor = { + GOLD, GRAY, BROWN, PURPLE + }; addMenuControl(*scene); scene->addEntity("Audio ressources") @@ -27,6 +30,14 @@ namespace BBM scene->addEntity("background") .addComponent() .addComponent("assets/plain_menu_background.png"); + for (int i = 0; i < 4; i++) { + auto &playerTile = scene->addEntity("player tile") + .addComponent(224 * (i + 1) + 200 * i, 1080 / 2.5, 0) + .addComponent(RAY::Vector2(224 * (i + 1) + 200 * i, 1080 / 3), RAY::Vector2(200, 200),tilesColor[i]); + auto &player = scene->addEntity("player") + .addComponent(224 * (i + 1) + 200 * i, 1080 / 2.5, 0) + .addComponent("assets/player/icons/none.png"); + } scene->addEntity("back to main menu") .addComponent(10, 1080 - 85, 0) .addComponent("assets/buttons/button_back.png")