#include #include #include "Runner.hpp" #include #include "Component/Music/MusicComponent.hpp" #include "Component/Sound/SoundComponent.hpp" #include "Component/Controllable/ControllableComponent.hpp" #include "Component/Position/PositionComponent.hpp" #include "Component/Keyboard/KeyboardComponent.hpp" #include "Component/Renderer/Drawable2DComponent.hpp" #include "Component/Button/ButtonComponent.hpp" #include "Drawables/2D/Text.hpp" namespace RAY2D = RAY::Drawables::Drawables2D; namespace BBM { std::shared_ptr Runner::loadCreditScene() { auto scene = std::make_shared(); static const std::map sounds = { {SoundComponent::BOMB, "assets/sounds/click.ogg"} }; addMenuControl(*scene, sounds); scene->addEntity("background") .addComponent() .addComponent("assets/backgrounds/plain.png"); scene->addEntity("Control entity") .addComponent("assets/musics/music_title.ogg") .addComponent(sounds); scene->addEntity("raylib logo") .addComponent(1920 / 3.5 - 200, 1080 / 1.75, 0) .addComponent("assets/raylib.png"); scene->addEntity("epitech logo") .addComponent(1920 / 1.5 - 200, 1080 / 1.5, 0) .addComponent("assets/epitech.png"); scene->addEntity("raylib text") .addComponent(1920 / 4 - 200, 1080 / 2, 0) .addComponent("Powered by:", 35, RAY::Vector2(), BLACK); scene->addEntity("other repo text") .addComponent(1920 / 4 - 200, 1080 / 4, 0) .addComponent("Many Thanks to:", 35, RAY::Vector2(), BLACK); scene->addEntity("thx brian") .addComponent(1920 / 3.5 - 200, 1080 / 3.25, 0) .addComponent("Brian Guitteny (and his team)\nAssets used by their permission", 35, RAY::Vector2(), BLACK); scene->addEntity("team") .addComponent(1920 / 1.5 - 200, 1080 / 4, 0) .addComponent("Team:\n Zoe Roux\n Clément Le Bihan\n Arthur Jamet\n Louis Auzuret\n Benjamin Henry\n Tom Augier", 35, RAY::Vector2(), BLACK); scene->addEntity("back to menu") .addComponent(10, 1080 - 85, 0) .addComponent("assets/buttons/button_back.png") .addComponent([](WAL::Entity &entity, WAL::Wal &) { gameState.nextScene = BBM::GameState::SceneID::MainMenuScene; }) .addComponent([](WAL::Entity &entity, WAL::Wal &) { RAY::Texture *texture = dynamic_cast(entity.getComponent().drawable.get()); texture->use("assets/buttons/button_back.png"); }) .addComponent([](WAL::Entity &entity, WAL::Wal &) { RAY::Texture *texture = dynamic_cast(entity.getComponent().drawable.get()); texture->use("assets/buttons/button_back_hovered.png"); }); scene->addEntity("raccoon") .addComponent(1920 / 1.17 - 200, 1080 / 4, 0) .addComponent("assets/credit/rac.png"); scene->addEntity("arthi") .addComponent(1920 / 1.17 - 200, 1080 / 2.75, 0) .addComponent("assets/credit/art.png"); scene->addEntity("eternal") .addComponent(1920 / 1.17 - 200, 1080 / 2.1, 0) .addComponent("assets/credit/ete.png"); scene->addEntity("octopus") .addComponent(1920 / 1.13 - 140, 1080 / 4 + 70, 0) .addComponent("assets/credit/oct.png"); scene->addEntity("bluub") .addComponent(1920 / 1.13 - 140, 1080 / 2.75 + 70, 0) .addComponent("assets/credit/blu.png"); scene->addEntity("true") .addComponent(1920 / 1.13 - 140, 1080 / 2.1 + 70, 0) .addComponent("assets/credit/tru.png"); return scene; } }