Fixed Corpse not being rendered.

This commit is contained in:
Felix Ableitner 2013-05-08 11:30:02 +02:00
parent 73bb918a01
commit 8ea278030d
5 changed files with 7 additions and 10 deletions

View file

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View file

@ -1,3 +0,0 @@
name: Body
texture: body.png
size: [50, 50]

View file

@ -0,0 +1,3 @@
name: Corpse
texture: corpse.png
radius: 25.0

View file

@ -12,9 +12,6 @@
#include "generator/Generator.h" #include "generator/Generator.h"
#include "sprites/Enemy.h" #include "sprites/Enemy.h"
#include "sprites/Player.h" #include "sprites/Player.h"
#include "util/Log.h"
#include "sprites/Corpse.h"
const int Game::FPS_GOAL = 60; const int Game::FPS_GOAL = 60;
@ -38,7 +35,6 @@ Game::Game(sf::RenderWindow& window) :
auto enemyPositions = mGenerator.getEnemySpawns(area); auto enemyPositions = mGenerator.getEnemySpawns(area);
for (const auto& position : enemyPositions) { for (const auto& position : enemyPositions) {
LOG_D(position);
if (thor::length(mPlayer->getPosition() - position) > Character::VISION_DISTANCE) if (thor::length(mPlayer->getPosition() - position) > Character::VISION_DISTANCE)
mWorld.insertCharacter(std::shared_ptr<Enemy>(new Enemy(mWorld, mPathfinder, position))); mWorld.insertCharacter(std::shared_ptr<Enemy>(new Enemy(mWorld, mPathfinder, position)));
} }

View file

@ -18,6 +18,7 @@ class CollisionModel {
public: public:
virtual ~CollisionModel() = 0; virtual ~CollisionModel() = 0;
protected:
static bool testCollision(const Circle& circle, const Rectangle& rect, static bool testCollision(const Circle& circle, const Rectangle& rect,
int elapsed); int elapsed);
static bool testCollision(const Circle& first, const Circle& second, static bool testCollision(const Circle& first, const Circle& second,