Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 4, 2019, 3:51:04 PM (5 years ago)
Author:
cwaupoti
Message:

comment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Boxhead_FS19/src/modules/weapons/projectiles/HoverGunProjectile.h

    r12262 r12273  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Joel Smely
    2424 *   Co-authors:
    25  *      simonmie
     25 *      ...
    2626 *
    2727 */
    2828
    2929/**
    30     @file Projectile.h
    31     @brief Definition of the Projectile class.
     30    @file HoverGunProjectile.h
     31    @brief Definition of the HoverGunProjectile class.
    3232*/
    3333
     
    3737#include "weapons/WeaponsPrereqs.h"
    3838
     39#include <string>
    3940#include "tools/Timer.h"
    40 #include "worldentities/MovableEntity.h"
    41 #include "objects/collisionshapes/SphereCollisionShape.h"
    42 
    43 #include "BasicProjectile.h"
     41#include "BillboardProjectile.h"
    4442
    4543namespace orxonox
     
    4846    /**
    4947    @brief
    50         Represents all 'standard' projectiles.
    51 
     48        The HoverGunProjectile is a projectile that is represented by a looped series of billboards.
     49       
    5250    @author
    53         Fabian 'x3n' Landau
    54     @author
    55         Simon Miescher
     51        Joel Smely
    5652    @ingroup WeaponsProjectiles
    5753    */
    58     class _WeaponsExport HoverGunProjectile : public MovableEntity, public BasicProjectile
     54    class _WeaponsExport HoverGunProjectile : public BillboardProjectile
    5955    {
    6056        public:
    6157            HoverGunProjectile(Context* context);
    62             virtual ~HoverGunProjectile();
     58            virtual ~HoverGunProjectile() {}
    6359
    64             void setConfigValues();
    65 
    66             virtual void tick(float dt) override;
    67             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    68 
    69         protected:
    70             virtual void setCollisionShapeRadius(float radius);
    71             float lifetime_; //!< The time the projectile exists.
     60            virtual void setMaterial(const std::string& material) override;
    7261
    7362        private:
    74             Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
    75             WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
     63            void registerVariables();
     64            void changeTexture();
     65           
     66            unsigned int textureIndex_; //!< The current index of the texture. (i.e. the index of the currently displayed texture)
     67            unsigned int maxTextureIndex_; //!< The maximal index.
     68            Timer textureTimer_; //!< A timer that loops and changes textures each time it expires.
     69            std::string materialBase_; //!< The base name of the material.
    7670    };
    7771}
    7872
    79 #endif /* _Projectile_H__ */
     73#endif /* _HoverGunProjectile_H__ */
Note: See TracChangeset for help on using the changeset viewer.