Simple 2D RPG made in C++ and SFML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
587 B

#ifndef ENTITY_H
#define ENTITY_H
#include <string>
#include <SFML/Graphics.hpp>
class Entity : public sf::Sprite
{
public:
Entity();
Entity(std::string fileName);
Entity(std::string fileName, sf::IntRect rect);
void Load(std::string fileName);
void Load(std::string fileName, sf::IntRect rect);
bool Collision(Entity *entity);
void SetActive(int active);
int Active();
int Group();
virtual void Update();
~Entity();
sf::Vector2f velocity;
protected:
int active, groupId;
private:
sf::Texture* texture;
};
#endif // ENTITY_H