Fixed Corpse not being rendered.
This commit is contained in:
parent
73bb918a01
commit
8ea278030d
5 changed files with 7 additions and 10 deletions
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
|
@ -1,3 +0,0 @@
|
|||
name: Body
|
||||
texture: body.png
|
||||
size: [50, 50]
|
3
resources/yaml/corpse.yaml
Normal file
3
resources/yaml/corpse.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
name: Corpse
|
||||
texture: corpse.png
|
||||
radius: 25.0
|
|
@ -12,9 +12,6 @@
|
|||
#include "generator/Generator.h"
|
||||
#include "sprites/Enemy.h"
|
||||
#include "sprites/Player.h"
|
||||
#include "util/Log.h"
|
||||
|
||||
#include "sprites/Corpse.h"
|
||||
|
||||
const int Game::FPS_GOAL = 60;
|
||||
|
||||
|
@ -38,7 +35,6 @@ 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<Enemy>(new Enemy(mWorld, mPathfinder, position)));
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Reference in a new issue