mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-03 10:26:29 +00:00
Finding the issue
This commit is contained in:
@@ -73,8 +73,8 @@ namespace BBM
|
||||
auto &animation = entity.getComponent<AnimationsComponent>();
|
||||
|
||||
animation.setAnimIndex(5);
|
||||
if (entity.hasComponent<ControllableComponent>())
|
||||
entity.removeComponent<ControllableComponent>();
|
||||
if (entity.hasComponent<AnimatorComponent>())
|
||||
entity.removeComponent<AnimatorComponent>();
|
||||
if (entity.hasComponent<TimerComponent>())
|
||||
return;
|
||||
entity.addComponent<TimerComponent>(1s, [](WAL::Entity &entity, WAL::Wal &wal) {
|
||||
|
||||
@@ -48,9 +48,10 @@ namespace BBM
|
||||
playersIconPath.push_back(path.replace(path.find("textures"), std::string("textures").size(), "icons"));
|
||||
auto &newPlayer = scene->addEntity("add");
|
||||
newPlayer.addComponent<LobbyComponent>(playerID++, newPlayer, newPlayer);
|
||||
newPlayer.getComponent<LobbyComponent>().layout = entity.get().getComponent<ControllableComponent>().layout;
|
||||
auto &lobby = newPlayer.getComponent<LobbyComponent>();
|
||||
lobby.layout = entity.get().getComponent<ControllableComponent>().layout; // TODO layout was none.
|
||||
std::string color = path.substr(path.find_last_of('/'), path.find_last_of('.'));
|
||||
newPlayer.getComponent<LobbyComponent>().color = std::find(LobbySystem::colors.begin(), LobbySystem::colors.end(), color) - LobbySystem::colors.begin();
|
||||
lobby.color = std::find(LobbySystem::colors.begin(), LobbySystem::colors.end(), color) - LobbySystem::colors.begin();
|
||||
}
|
||||
|
||||
addMenuControl(*scene, sounds);
|
||||
|
||||
Reference in New Issue
Block a user