diff --git a/sources/Map/Map.cpp b/sources/Map/Map.cpp index b310c5ac..0fc9e4b7 100644 --- a/sources/Map/Map.cpp +++ b/sources/Map/Map.cpp @@ -33,8 +33,8 @@ namespace BBM entity.addComponent(position) .addComponent>() .addComponent() - .addComponent(1, [](WAL::Entity &entity, WAL::Wal &wal) { - entity.scheduleDeletion(); + .addComponent(1, [](WAL::Entity &myEntity, WAL::Wal &wal) { + myEntity.scheduleDeletion(); }) .addComponent(position.y) .addComponent([](WAL::Entity &bonus, const WAL::Entity &player, CollisionComponent::CollidedAxis axis) { diff --git a/sources/Runner/MainMenuScene.cpp b/sources/Runner/MainMenuScene.cpp index ab678654..3029e09a 100644 --- a/sources/Runner/MainMenuScene.cpp +++ b/sources/Runner/MainMenuScene.cpp @@ -72,20 +72,20 @@ namespace BBM .addComponent([](WAL::Entity &entity, WAL::Wal &) { gameState.nextScene = BBM::GameState::SceneID::ResumeLobbyScene; - auto scene = Runner::loadGameScene(); + auto gameScene = Runner::loadGameScene(); try { - ParserYAML::load(scene); + ParserYAML::load(gameScene); } catch (std::exception const &err) { Runner::gameState._loadedScenes[GameState::SceneID::LobbyScene]->addEntity("Error message parser") .addComponent(1920 / 5, 2 * 1080 / 4.25, 0) .addComponent(err.what(), 50, RAY::Vector2(), RED) - .addComponent(3s, [](WAL::Entity &entity, WAL::Wal &wal) { - entity.scheduleDeletion(); + .addComponent(3s, [](WAL::Entity &myEntity, WAL::Wal &wal) { + myEntity.scheduleDeletion(); }); gameState.nextScene = BBM::GameState::SceneID::LobbyScene; return; } - Runner::gameState._loadedScenes[GameState::SceneID::GameScene] = scene; + Runner::gameState._loadedScenes[GameState::SceneID::GameScene] = gameScene; }); auto &settings = scene->addEntity("settings button") .addComponent(1920 / 2.5, 1080 - 430, 0)