This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/abstract/Sprite.h
Felix Ableitner 45f0b31d57 Initial commit after git corruption, old repo deleted.
Working:
Rendering
Resources
Physics
Player movement with mouse
Shooting with mouse
Tiles
2012-09-10 17:26:37 +02:00

36 lines
743 B
C++

/*
* Sprite.h
*
* Created on: 22.07.2012
* Author: Felix
*/
#ifndef DG_SPRITE_H_
#define DG_SPRITE_H_
#include <SFML/Graphics.hpp>
#include <Thor/Resources.hpp>
#include "Physical.h"
#include "../util/Vector.h"
/**
* Represents a drawable object.
*
* Handles drawing to world.
*/
class Sprite : public sf::Drawable, public Physical {
public:
Sprite(const sf::String& texturePath, const PhysicalData& data);
Sprite(const std::shared_ptr<sf::Texture>& texture, const PhysicalData& data);
virtual ~Sprite() = 0;
private:
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
std::shared_ptr<sf::Texture> mTexture;
Vector2i mSize;
};
#endif /* DG_SPRITE_H_ */