- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/weaponSystem/projectiles/Projectile.h
r2099 r2662 33 33 34 34 #include "objects/worldentities/MovableEntity.h" 35 #include "objects/worldentities/pawns/Pawn.h" 35 36 #include "tools/Timer.h" 36 37 37 38 namespace orxonox 38 39 { 39 class _OrxonoxExport Projectile : public MovableEntity 40 class _OrxonoxExport Projectile : public MovableEntity, public PawnListener 40 41 { 41 42 public: 43 Projectile(BaseObject* creator); 42 44 virtual ~Projectile(); 45 43 46 void setConfigValues(); 44 void speedChanged();45 47 void destroyObject(); 48 46 49 virtual void tick(float dt); 50 virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 51 virtual void destroyedPawn(Pawn* pawn); 47 52 48 virtual bool create(); 49 50 static float getSpeed() 51 { return Projectile::speed_s; } 52 53 protected: 54 Projectile(BaseObject* creator, Weapon* owner = 0); 55 SpaceShip* owner_; 53 inline void setOwner(Pawn* owner) 54 { this->owner_ = owner; } 55 inline Pawn* getOwner() const 56 { return this->owner_; } 56 57 57 58 private: 58 std::string explosionTemplateName_; 59 std::string smokeTemplateName_; 60 protected: 61 static float speed_s; 62 float speed_; 63 private: 59 Pawn* owner_; 64 60 float lifetime_; 65 61 float damage_; 62 bool bDestroy_; 66 63 Timer<Projectile> destroyTimer_; 67 64 };
Note: See TracChangeset
for help on using the changeset viewer.