mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
Fixing PR issues
This commit is contained in:
@@ -33,7 +33,7 @@ add_library(wal
|
|||||||
|
|
||||||
target_include_directories(wal PUBLIC sources)
|
target_include_directories(wal PUBLIC sources)
|
||||||
|
|
||||||
add_executable(wal_tests
|
add_executable(wal_tests EXCLUDE_FROM_ALL
|
||||||
tests/EntityTests.cpp
|
tests/EntityTests.cpp
|
||||||
tests/MainTest.cpp
|
tests/MainTest.cpp
|
||||||
tests/EngineTests.cpp
|
tests/EngineTests.cpp
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
//
|
||||||
|
// Created by Zoe Roux on 2021-05-14.
|
||||||
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
//
|
||||||
|
// Created by Zoe Roux on 2021-05-14.
|
||||||
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
@@ -44,7 +46,7 @@ namespace WAL
|
|||||||
T &getComponent()
|
T &getComponent()
|
||||||
{
|
{
|
||||||
const std::type_info &type = typeid(T);
|
const std::type_info &type = typeid(T);
|
||||||
auto existing = std::find_if(this->_components.begin(), this->_components.end(), [&type] (auto &cmp) {
|
auto existing = std::find_if(this->_components.begin(), this->_components.end(), [&type] (const auto &cmp) {
|
||||||
return typeid(*cmp) == type;
|
return typeid(*cmp) == type;
|
||||||
});
|
});
|
||||||
if (existing == this->_components.end())
|
if (existing == this->_components.end())
|
||||||
@@ -88,7 +90,7 @@ namespace WAL
|
|||||||
Entity &removeComponent()
|
Entity &removeComponent()
|
||||||
{
|
{
|
||||||
const std::type_info &type = typeid(T);
|
const std::type_info &type = typeid(T);
|
||||||
auto existing =std::find_if(this->_components.begin(), this->_components.end(), [&type] (auto &cmp) {
|
auto existing = std::find_if(this->_components.begin(), this->_components.end(), [&type] (const auto &cmp) {
|
||||||
return typeid(*cmp) == type;
|
return typeid(*cmp) == type;
|
||||||
});
|
});
|
||||||
if (existing == this->_components.end())
|
if (existing == this->_components.end())
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace WAL
|
|||||||
{
|
{
|
||||||
std::vector<Entity> &Scene::getEntities()
|
std::vector<Entity> &Scene::getEntities()
|
||||||
{
|
{
|
||||||
return this->_entity;
|
return this->_entities;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace WAL
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
//! @brief The list of registered entities
|
//! @brief The list of registered entities
|
||||||
std::vector<Entity> _entity;
|
std::vector<Entity> _entities;
|
||||||
public:
|
public:
|
||||||
//! @brief Get the list of entities.
|
//! @brief Get the list of entities.
|
||||||
std::vector<Entity> &getEntities();
|
std::vector<Entity> &getEntities();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace WAL
|
|||||||
//! @return The manager instance used to call this function is returned. This allow method chaining.
|
//! @return The manager instance used to call this function is returned. This allow method chaining.
|
||||||
SceneManager &addScene(Scene &&scene);
|
SceneManager &addScene(Scene &&scene);
|
||||||
|
|
||||||
//! @brief Add a scene before the current scene to allow
|
//! @brief Add a scene before the current scene. This could be useful for lobbies or scene where the next scene can be constructed.
|
||||||
//! @return The manager instance used to call this function is returned. This allow method chaining.
|
//! @return The manager instance used to call this function is returned. This allow method chaining.
|
||||||
SceneManager &addBackScene(Scene &&scene);
|
SceneManager &addBackScene(Scene &&scene);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
//
|
||||||
|
// Created by Zoe Roux on 2021-05-14.
|
||||||
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace WAL
|
|||||||
{
|
{
|
||||||
std::chrono::nanoseconds Wal::timestep = 8ms;
|
std::chrono::nanoseconds Wal::timestep = 8ms;
|
||||||
|
|
||||||
SceneManager &Wal::getSceneManger()
|
SceneManager &Wal::getSceneManager()
|
||||||
{
|
{
|
||||||
return this->_scenes;
|
return this->_scenes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace WAL
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Get the scene manager.
|
//! @brief Get the scene manager.
|
||||||
SceneManager &getSceneManger();
|
SceneManager &getSceneManager();
|
||||||
|
|
||||||
//! @brief Start the game loop
|
//! @brief Start the game loop
|
||||||
void run();
|
void run();
|
||||||
|
|||||||
Reference in New Issue
Block a user