mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-29 17:02:11 +00:00
fixing small issues
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace BBM
|
||||
.addSystem<EndConditionSystem>()
|
||||
.addSystem<ScoreSystem>()
|
||||
.addSystem<CameraSystem>()
|
||||
.addSystem<ResumeLobbySystem>()
|
||||
.addSystem<ResumeLobbySystem>()
|
||||
.addSystem<MusicSystem>();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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 &);
|
||||
|
||||
Reference in New Issue
Block a user