RTS2D
include/object/Entity.h
00001 #ifndef ENTITY_H
00002 #include <vector>
00003 #include "allegro5/allegro.h"
00004 #include "allegro5/allegro_image.h"
00005 #define ENTITY_H
00006 
00010 class Entity {
00011 public:
00012     virtual ~Entity();
00013     float getPx();
00014     void setPx(float px);
00015     float getPy();
00016     void setPy(float px);
00017     int getType();
00018     void setType(int type);
00019     int getTeam();
00020     void setTeam(int team);
00021     float getHp();
00022     void setHp(float hp);
00023     std::vector<std::pair<float,float>> getPixelPath();
00024     void setPixelPath(std::vector<std::pair<float,float>> pixelPath);
00025     Entity* getEntity();
00026     void setEntity(Entity* entity);
00027 
00028     virtual float getRadius() = 0;
00029     virtual float getMaxHp() = 0;
00030     virtual bool isBuilding();
00031     virtual bool isUnit();
00032 
00033     std::pair<float,float> getCoordinates();
00034     void setCoordinates(float px, float py);
00035     void receiveDamage(float damage);
00036 
00037 protected:
00038     Entity();
00039     float px_;
00040     float py_;
00041     int type_;
00042     int team_;
00043     float hp_;
00044     std::vector<std::pair<float,float>> pixelPath_;
00045     Entity* entity_;
00046 
00047 private:
00048 };
00049 
00050 #endif // ENTITY_H
 Todos Classes Funções