00001 #ifndef GROUNDVEHICLESPRITE_H 00002 #define GROUNDVEHICLESPRITE_H 00003 00004 #include "VehicleSprite.h" 00005 #include "FireSprite.h" 00006 00007 class GroundVehicleSprite : public VehicleSprite 00008 { 00009 public: 00010 bool accel; 00011 bool slowDown; 00012 bool left; 00013 bool right; 00014 float speed; 00015 bool dead; 00016 00017 protected: 00018 // CompModel *model; ///< Pointer to a model associated with this sprite 00019 TexID tex; 00020 00021 float length, width; 00022 float normal[3]; 00023 FireSprite *fireSprite; 00024 00025 public: 00026 GroundVehicleSprite(int owner, std::string type); 00027 00028 void setAccelerate(bool b); 00029 void setSlowDown(bool b); 00030 void setTurnLeft(bool b); 00031 void setTurnRight(bool b); 00032 00033 void paint(); 00034 void findNormal(float *ret_norm); 00035 // CompModel *getModel() const {return model;} 00036 bool checkCollision(Sprite *with, bool fromSelf); 00037 bool notifyCollision(Sprite *sender); 00038 void inflictDamage(DamageType dmg, float strength); 00039 void handleCollision(Sprite* with); 00040 bool updateHealth(); 00041 void updatePosition(); 00042 void updateNormal(); 00043 }; 00044 00045 #endif /*GROUNDVEHICLESPRITE_H*/
1.4.7