diff --git a/resources/textures/body.png b/resources/textures/corpse.png similarity index 100% rename from resources/textures/body.png rename to resources/textures/corpse.png diff --git a/resources/yaml/body.yaml b/resources/yaml/body.yaml deleted file mode 100644 index d1607a4..0000000 --- a/resources/yaml/body.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: Body -texture: body.png -size: [50, 50] \ No newline at end of file diff --git a/resources/yaml/corpse.yaml b/resources/yaml/corpse.yaml new file mode 100644 index 0000000..e1c43cb --- /dev/null +++ b/resources/yaml/corpse.yaml @@ -0,0 +1,3 @@ +name: Corpse +texture: corpse.png +radius: 25.0 \ No newline at end of file diff --git a/source/Game.cpp b/source/Game.cpp index 4546dd2..b18083c 100644 --- a/source/Game.cpp +++ b/source/Game.cpp @@ -10,11 +10,8 @@ #include #include "generator/Generator.h" -#include "sprites/Enemy.h" -#include "sprites/Player.h" -#include "util/Log.h" - -#include "sprites/Corpse.h" +#include "sprites/Enemy.h" +#include "sprites/Player.h" const int Game::FPS_GOAL = 60; @@ -38,9 +35,8 @@ Game::Game(sf::RenderWindow& window) : auto enemyPositions = mGenerator.getEnemySpawns(area); for (const auto& position : enemyPositions) { - LOG_D(position); if (thor::length(mPlayer->getPosition() - position) > Character::VISION_DISTANCE) - mWorld.insertCharacter(std::shared_ptr(new Enemy(mWorld, mPathfinder, position))); + mWorld.insertCharacter(std::shared_ptr(new Enemy(mWorld, mPathfinder, position))); } } diff --git a/source/abstract/CollisionModel.h b/source/abstract/CollisionModel.h index 9af6c96..204c60d 100644 --- a/source/abstract/CollisionModel.h +++ b/source/abstract/CollisionModel.h @@ -18,6 +18,7 @@ class CollisionModel { public: virtual ~CollisionModel() = 0; +protected: static bool testCollision(const Circle& circle, const Rectangle& rect, int elapsed); static bool testCollision(const Circle& first, const Circle& second,