Removed Cover class.

This commit is contained in:
Felix Ableitner 2012-11-13 19:58:17 +01:00
parent 27388c7af3
commit 1e0d005a1b
3 changed files with 2 additions and 44 deletions

View file

@ -10,7 +10,6 @@
#include <Thor/Graphics.hpp>
#include "abstract/Character.h"
#include "sprites/Cover.h"
#include "sprites/Enemy.h"
#include "types/Instances.h"
#include "types/String.h"
@ -32,7 +31,7 @@ Game::Game(sf::RenderWindow& window) :
mView(Vector2f(0, 0), mWindow.getView().getSize()),
//mFps("test"),
mTileManager(mWorld),
mPathfinder(mWorld),
mPathfinder(mTileManager),
mElapsed(0),
mQuit(false),
mPaused(false) {
@ -62,8 +61,6 @@ Game::generate() {
Instances instances(mPathfinder, mTileManager, mCollection, mWorld);
mCollection.insert(std::shared_ptr<Sprite>(new Enemy(instances, Vector2f(400.0f, 200.0f), Yaml("enemy.yaml"))));
mCollection.insert(std::shared_ptr<Sprite>(new Cover(Vector2f(300, 200), Vector2i(100, 150),
mWorld, Yaml("cover.yaml"))));
mPlayer = std::unique_ptr<Player>(new Player(instances, Vector2f(200.0f, 100.0f), Yaml("player.yaml")));
}

View file

@ -1,13 +0,0 @@
/*
* Cover.cpp
*
* Created on: 12.08.2012
* Author: Felix
*/
#include "Cover.h"
Cover::Cover(const Vector2f& position, const Vector2i& size, b2World& world, const Yaml& config) :
Sprite(config, PhysicalData(position, world, CATEGORY_WORLD, MASK_ALL, false), size) {
}

View file

@ -1,26 +0,0 @@
/*
* Cover.h
*
* Created on: 12.08.2012
* Author: Felix
*/
#ifndef DG_COVER_H_
#define DG_COVER_H_
#include "../abstract/Sprite.h"
#include "../util/Yaml.h"
class Sprite;
class Yaml;
/**
* A wall that can be placed anywhere (not limited by tiles) and have any (rectangular) size.
*/
class Cover : public Sprite {
// Public functions.
public:
Cover(const Vector2f& position, const Vector2i& size, b2World& world, const Yaml& config);
};
#endif /* DG_COVER_H_ */