Skip to content

Commit

Permalink
fix: include flappy birds
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius committed Nov 3, 2019
1 parent 9e45179 commit bc3c691
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tutorials/flappy-bird/step_7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ init_apple_env()
add_executable(${PROJECT_NAME} flappy-bird.cpp)

##! We link the SDK modules that we want to use to our executable
target_link_libraries(${PROJECT_NAME} PUBLIC antara::world antara::sfml)
target_link_libraries(${PROJECT_NAME} PUBLIC antara::world antara::sfml antara::collisions)
19 changes: 9 additions & 10 deletions tutorials/flappy-bird/step_7/flappy-bird.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#include <antara/gaming/world/world.app.hpp>
#include <random>
#include <antara/gaming/collisions/basic.collision.system.hpp>
#include <antara/gaming/graphics/component.layer.hpp>
#include <antara/gaming/graphics/component.canvas.hpp>
#include <antara/gaming/math/vector.hpp>
#include <antara/gaming/scenes/scene.manager.hpp>
#include <antara/gaming/sfml/graphic.system.hpp>
#include <antara/gaming/sfml/input.system.hpp>
#include <antara/gaming/scenes/scene.manager.hpp>
#include <antara/gaming/math/vector.hpp>
#include <antara/gaming/graphics/component.canvas.hpp>
#include <antara/gaming/graphics/component.layer.hpp>
#include <antara/gaming/sfml/resources.manager.hpp>
#include <antara/gaming/sfml/component.drawable.hpp>
// TODO: antara/gaming/collisions/basic.collision.system.hpp not found
#include "cmake-build-debug/_deps/antara-gaming-sdk-src/modules/collisions/antara/gaming/collisions/basic.collision.system.hpp"
#include <random>
#include <iostream>
#include <antara/gaming/world/world.app.hpp>

//! For convenience
using namespace antara::gaming;
Expand Down Expand Up @@ -486,8 +484,9 @@ class game_scene final : public scenes::base_scene {

void reset_game() {
entt::registry &registry = this->entity_registry_;
ecs::system_manager& system_mgr = this->system_manager;
this->~game_scene();
new(this) game_scene(registry, system_manager);
new(this) game_scene(registry, system_mgr);
}
};

Expand Down

0 comments on commit bc3c691

Please sign in to comment.