mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-30 01:05:24 +00:00
fix indentation
This commit is contained in:
@@ -18,64 +18,64 @@ namespace BBM
|
||||
std::shared_ptr<WAL::Scene> Runner::loadHowToPlayScene()
|
||||
{
|
||||
auto scene = std::make_shared<WAL::Scene>();
|
||||
static const std::map<SoundComponent::SoundIndex, std::string> sounds = {
|
||||
static const std::map<SoundComponent::SoundIndex, std::string> sounds = {
|
||||
{SoundComponent::JUMP, "assets/sounds/click.ogg"}
|
||||
};
|
||||
|
||||
addMenuControl(*scene);
|
||||
addMenuControl(*scene);
|
||||
scene->addEntity("Control entity")
|
||||
.addComponent<MusicComponent>("assets/musics/music_player_select.ogg")
|
||||
.addComponent<SoundComponent>(sounds);
|
||||
scene->addEntity("background")
|
||||
.addComponent<PositionComponent>()
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/plain_menu_background.png");
|
||||
scene->addEntity("scene title text")
|
||||
scene->addEntity("scene title text")
|
||||
.addComponent<PositionComponent>(1920 / 3, 100, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("How To Play?", 120, RAY::Vector2(), ORANGE);
|
||||
|
||||
scene->addEntity("select text")
|
||||
|
||||
scene->addEntity("select text")
|
||||
.addComponent<PositionComponent>(1920 / 8, 1080 / 3, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Select:", 60, RAY::Vector2(), ORANGE);
|
||||
scene->addEntity("select")
|
||||
scene->addEntity("select")
|
||||
.addComponent<PositionComponent>(1920 / 7, 1080 / 2.5, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Space/A Button", 35, RAY::Vector2(), BLACK);
|
||||
scene->addEntity("change skin text")
|
||||
scene->addEntity("change skin text")
|
||||
.addComponent<PositionComponent>(1920 / 8, 1080 / 2, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Change Skin/Drop Bomb:", 60, RAY::Vector2(), ORANGE);
|
||||
scene->addEntity("change skin")
|
||||
scene->addEntity("change skin")
|
||||
.addComponent<PositionComponent>(1920 / 7, 1080 / 1.75, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("E/B Button", 35, RAY::Vector2(), BLACK);
|
||||
scene->addEntity("move text")
|
||||
scene->addEntity("move text")
|
||||
.addComponent<PositionComponent>(1920 / 1.75, 1080 / 3, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Move:", 60, RAY::Vector2(), ORANGE);
|
||||
scene->addEntity("move")
|
||||
scene->addEntity("move")
|
||||
.addComponent<PositionComponent>(1920 / 1.75, 1080 / 2.5, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Q-Z-S-D/Arrow/Joystick", 35, RAY::Vector2(), BLACK);
|
||||
scene->addEntity("back text")
|
||||
scene->addEntity("back text")
|
||||
.addComponent<PositionComponent>(1920 / 1.75, 1080 / 2, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Back/Pause:", 60, RAY::Vector2(), ORANGE);
|
||||
scene->addEntity("back")
|
||||
scene->addEntity("back")
|
||||
.addComponent<PositionComponent>(1920 / 1.75, 1080 / 1.75, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("Esc / Controller's Home button:", 35, RAY::Vector2(), BLACK);
|
||||
auto &back = scene->addEntity("back to menu")
|
||||
auto &back = scene->addEntity("back to menu")
|
||||
.addComponent<PositionComponent>(10, 1080 - 85, 0)
|
||||
.addComponent<Drawable2DComponent, RAY::Texture>("assets/buttons/button_back.png")
|
||||
.addComponent<OnClickComponent>([](WAL::Entity &entity, WAL::Wal &)
|
||||
{
|
||||
gameState.nextScene = BBM::GameState::SceneID::LobbyScene;
|
||||
gameState.nextScene = BBM::GameState::SceneID::LobbyScene;
|
||||
})
|
||||
.addComponent<OnIdleComponent>([](WAL::Entity &entity, WAL::Wal &)
|
||||
{
|
||||
RAY::Texture *texture = dynamic_cast<RAY::Texture *>(entity.getComponent<Drawable2DComponent>().drawable.get());
|
||||
{
|
||||
RAY::Texture *texture = dynamic_cast<RAY::Texture *>(entity.getComponent<Drawable2DComponent>().drawable.get());
|
||||
|
||||
texture->use("assets/buttons/button_back.png");
|
||||
texture->use("assets/buttons/button_back.png");
|
||||
})
|
||||
.addComponent<OnHoverComponent>([](WAL::Entity &entity, WAL::Wal &)
|
||||
{
|
||||
RAY::Texture *texture = dynamic_cast<RAY::Texture *>(entity.getComponent<Drawable2DComponent>().drawable.get());
|
||||
RAY::Texture *texture = dynamic_cast<RAY::Texture *>(entity.getComponent<Drawable2DComponent>().drawable.get());
|
||||
|
||||
texture->use("assets/buttons/button_back_hovered.png");
|
||||
});
|
||||
return scene;
|
||||
}
|
||||
});
|
||||
return scene;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user