RTS2D
|
00001 #ifndef PROJECTILE_H 00002 #include <cmath> 00003 #include "ProjectileProperty.h" 00004 #include "Entity.h" 00005 #include "allegro5/allegro.h" 00006 #include "Define.h" 00007 #define PROJECTILE_H 00008 00012 class Projectile { 00013 public: 00014 Projectile(float px, float py, float damage, int type, Entity* target); 00015 virtual ~Projectile(); 00016 float getPx(); 00017 float getPy(); 00018 float getAngle(); 00019 float getDamage(); 00020 int getType(); 00021 Entity* getTarget(); 00022 00023 float getSpeed(); 00024 float getRadius(); 00025 ALLEGRO_BITMAP* getBitmap(); 00026 00027 std::pair<float,float> getNextMovement(); 00028 void move(std::pair<float,float> d); 00029 void update(); 00030 void render(); 00031 00032 protected: 00033 private: 00034 float px_; 00035 float py_; 00036 float angle_; 00037 float damage_; 00038 int type_; 00039 Entity* target_; 00040 }; 00041 00042 #endif // PROJECTILE_H