00001 00007 #ifndef _ENTITY_H_ 00008 #define _ENTITY_H_ 00009 00010 #include "IsoBomb.h" 00011 #include "Animation.h" 00012 #include "Drawable.h" 00013 00017 class Entity : public Drawable { 00018 00019 public: 00020 00024 Entity(); 00025 00032 Entity( const Rect& initPos, int initDir ); 00033 00037 virtual ~Entity(); 00038 00046 virtual bool checkCollision( const Entity* otherEntity ); 00047 00054 virtual void doCollision( Entity* otherEntity ); 00055 00062 virtual bool update( float dt )= 0; 00063 00068 virtual void draw( const Point& anchor ) = 0; 00069 00075 virtual const Rect& getPosition() const; 00076 00082 int getDirection() const; 00083 00087 void reverseDirection(); 00088 00089 protected: 00090 00094 Rect pos; 00095 00099 Animation anim; 00100 00104 int direction; 00105 00109 float cachedHeight; 00110 00111 }; 00112 00113 #endif