Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
gun.h
1 #pragma once
2 
3 #include <glm/glm.hpp>
4 
5 #include "equipment/weapon.h"
6 
7 
8 class SoundProperties;
9 class Bullet;
10 
11 class Gun: public Weapon {
12 public:
13  Gun(const std::string& equipmentKey);
14 
15  virtual const SoundProperties& fireSound() const = 0;
16 
17  virtual float bulletLifetime() const = 0;
18  virtual float bulletSpeed() const = 0;
19 
20  virtual void fireAtPoint(const glm::vec3& point);
21 
22  virtual void update(float deltaSec) override;
23 
24 
25 protected:
26  virtual Bullet* createBullet() = 0;
27  void setupBullet(Bullet* bullet, const glm::vec3& point);
28 };
29 
Definition: weapon.h:24
Definition: bullet.h:12
Definition: gun.h:11
Definition: soundproperties.h:5