fixing small issues

This commit is contained in:
Clément Le Bihan
2021-06-18 20:08:34 +02:00
parent 4669ff9280
commit 41e1becdeb
7 changed files with 10 additions and 12 deletions
+3 -1
View File
@@ -190,7 +190,9 @@ set(SOURCES
sources/Component/Color/ColorComponent.cpp
sources/Component/Stat/StatComponent.cpp
sources/Component/Stat/StatComponent.hpp
sources/Component/Speed/SpeedComponent.cpp sources/Component/Speed/SpeedComponent.hpp)
sources/Component/Speed/SpeedComponent.cpp
sources/Component/Speed/SpeedComponent.hpp
)
add_executable(bomberman
sources/main.cpp
+1
View File
@@ -60,4 +60,5 @@ namespace BBM
constexpr const char Bumper[] = "Bumper";
// interact with bombs (getting damage etc) but doesn't stop explosion
constexpr const char BlowablePass[] = "BlowablePass";
constexpr const char Timer[] = "Timer";
}
+1 -6
View File
@@ -46,12 +46,7 @@ namespace BBM
std::vector<Node> Node::getChildNodes(void)
{
std::vector<Node> childs;
for (const auto &child : this->_childNodes) {
childs.emplace_back(child);
}
return childs;
return this->_childNodes;
}
void Node::setName(const std::string &name)
+1 -1
View File
@@ -116,7 +116,7 @@ namespace BBM
.addSystem<EndConditionSystem>()
.addSystem<ScoreSystem>()
.addSystem<CameraSystem>()
.addSystem<ResumeLobbySystem>()
.addSystem<ResumeLobbySystem>()
.addSystem<MusicSystem>();
}
+1 -1
View File
@@ -35,7 +35,7 @@ namespace BBM
Runner::gameState.nextScene = GameState::ScoreScene;
})
.addComponent<PositionComponent>(1920 / 2 - 2 * 30, 30, 0)
.addComponent<TagComponent<"Timer">>()
.addComponent<TagComponent<Timer>>()
.addComponent<Drawable2DComponent, RAY2D::Text>("", 60, RAY::Vector2(), ORANGE);
for (WAL::Entity &player : this->_wal.getScene()->view<TagComponent<Player>>())
player.getComponent<ControllableComponent>().disabled = false;
+1 -1
View File
@@ -15,7 +15,7 @@ namespace BBM
: System(wal)
{}
void TimerUISystem::onUpdate(WAL::ViewEntity<TimerComponent, Drawable2DComponent, TagComponent<"Timer">> &entity, std::chrono::nanoseconds dtime)
void TimerUISystem::onUpdate(WAL::ViewEntity<TimerComponent, Drawable2DComponent, TagComponent<Timer>> &entity, std::chrono::nanoseconds dtime)
{
auto &timer = entity.get<TimerComponent>();
RAY2D::Text *text = dynamic_cast<RAY2D::Text *>(entity.get<Drawable2DComponent>().drawable.get());
+2 -2
View File
@@ -12,11 +12,11 @@
namespace BBM
{
class TimerUISystem : public WAL::System<TimerComponent, Drawable2DComponent, TagComponent<"Timer">>
class TimerUISystem : public WAL::System<TimerComponent, Drawable2DComponent, TagComponent<Timer>>
{
public:
//! @inherit
void onUpdate(WAL::ViewEntity<TimerComponent, Drawable2DComponent, TagComponent<"Timer">> &entity, std::chrono::nanoseconds dtime) override;
void onUpdate(WAL::ViewEntity<TimerComponent, Drawable2DComponent, TagComponent<Timer>> &entity, std::chrono::nanoseconds dtime) override;
//! @brief A default constructor
explicit TimerUISystem(WAL::Wal &);