Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
projectile.h
1 #pragma once
2 
3 #include "worldobject/worldobject.h"
4 
5 class SoundProperties;
6 
12 class Projectile: public WorldObject {
13 public:
14  Projectile();
15 
16  virtual const SoundProperties& hitSound() const = 0;
17 
18  WorldObject* creator();
19  void setCreator(WorldObject* creator);
20 
21  float lifetime() const;
22  void setLifetime(float lifetime);
23 
24  virtual void update(float deltaSec) override;
25  virtual void onCollision() override;
26  virtual void onSpawnFail() override;
27 
28 protected:
29  WorldObject* m_creator;
30  float m_lifetime;
31 
32  virtual void onLifetimeOver();
33  virtual void spawnExplosion() = 0;
34 };
35 
Definition: worldobject.h:43
Definition: projectile.h:12
Definition: soundproperties.h:5