- Timestamp:
- Apr 4, 2019, 5:13:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Boxhead_FS19/src/modules/weapons/projectiles/HoverGunProjectile.h
r12274 r12284 21 21 * 22 22 * Author: 23 * Joel Smely23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * simonmie 26 26 * 27 27 */ … … 37 37 #include "weapons/WeaponsPrereqs.h" 38 38 39 #include <string>40 39 #include "tools/Timer.h" 41 #include "BillboardProjectile.h" 40 #include "worldentities/MovableEntity.h" 41 #include "objects/collisionshapes/SphereCollisionShape.h" 42 43 #include "BasicProjectile.h" 42 44 43 45 namespace orxonox … … 46 48 /** 47 49 @brief 48 The HoverGunProjectile is a projectile that is represented by a looped series of billboards.49 50 Represents all 'standard' projectiles. 51 50 52 @author 51 Joel Smely 53 Fabian 'x3n' Landau 54 @author 55 Simon Miescher 52 56 @ingroup WeaponsProjectiles 53 57 */ 54 class _WeaponsExport HoverGunProjectile : public BillboardProjectile58 class _WeaponsExport HoverGunProjectile : public MovableEntity, public BasicProjectile 55 59 { 56 60 public: 57 61 HoverGunProjectile(Context* context); 58 virtual ~HoverGunProjectile() {}62 virtual ~HoverGunProjectile(); 59 63 60 v irtual void setMaterial(const std::string& material) override;64 void setConfigValues(); 61 65 62 /** 63 @file LightningGunProjectile.h 64 @brief Definition of the LightningGunProjectile class. 65 */ 66 67 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override; 66 68 67 #ifndef _HoverGunProjectile_H__ 68 #define _HoverGunProjectile_H__ 69 70 #include "weapons/WeaponsPrereqs.h" 71 72 #include <string> 73 #include "tools/Timer.h" 74 #include "BillboardProjectile.h" 75 76 namespace orxonox 77 { 78 79 /** 80 @brief 81 The LightningGunProjectile is a projectile that is represented by a looped series of billboards. 82 83 @author 84 Joel Smely 85 @ingroup WeaponsProjectiles 86 */ 87 class _WeaponsExport HoverGunProjectile : public BillboardProjectile 88 { 89 public: 90 HoverGunProjectile(Context* context); 91 virtual ~HoverGunProjectile() {} 92 93 virtual void setMaterial(const std::string& material) override; 69 protected: 70 virtual void setCollisionShapeRadius(float radius); 71 float lifetime_; //!< The time the projectile exists. 94 72 95 73 private: 96 void registerVariables(); 97 void changeTexture(); 98 99 unsigned int textureIndex_; //!< The current index of the texture. (i.e. the index of the currently displayed texture) 100 unsigned int maxTextureIndex_; //!< The maximal index. 101 Timer textureTimer_; //!< A timer that loops and changes textures each time it expires. 102 std::string materialBase_; //!< The base name of the material. 74 Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out. 75 WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile. 103 76 }; 104 77 } 105 78 106 #endif /* _ HoverGunProjectile_H__ */79 #endif /* _Projectile_H__ */
Note: See TracChangeset
for help on using the changeset viewer.