Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
genericgun.h
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include "sound/soundproperties.h"
7 #include "display/rendering/visuals.h"
8 
9 #include "bullet.h"
10 #include "gun.h"
11 
12 
13 
14 class GenericGun: public Gun {
15 public:
16  GenericGun(const std::string& name);
17 
18  virtual float bulletLifetime() const override;
19  void setBulletLifetime(float bulletLifetime);
20 
21  virtual float bulletSpeed() const override;
22  void setBulletSpeed(float bulletSpeed);
23 
24  virtual const Visuals& visuals() const override;
25  void setVisuals(const Visuals& visuals);
26 
27  virtual const SoundProperties& fireSound() const override;
28  void setFireSound(const SoundProperties& fireSound);
29 
30  virtual float cooldownTime() const override;
31  void setCooldownTime(float cooldownTime);
32 
33  const std::string& bulletName() const;
34  void setBulletName(const std::string& bulletName);
35 
36 
37 protected:
38  float m_bulletSpeed;
39  float m_bulletLifetime;
40  float m_cooldownTime;
41  Visuals m_visuals;
42  SoundProperties m_fireSound;
43  std::string m_bulletName;
44 
45  virtual Bullet* createBullet() override;
46 };
47 
Definition: visuals.h:11
Definition: genericgun.h:14
Definition: bullet.h:12
Definition: gun.h:11
Definition: soundproperties.h:5