Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
damager.h
1 #pragma once
2 
3 #include <map>
4 #include <list>
5 
6 #include "world/helper/damageimpact.h"
7 #include "world/helper/worldobjectmodification.h"
8 
9 #include "property/property.h"
10 
11 
12 class WorldObject;
13 
14 class Damager
15 {
16 public:
17  Damager();
18 
19  void applyDamages(std::list<DamageImpact> &damageImpacts);
20  void reset();
21 
22  std::list<DamageImpact> &dampedDeadlyDamageImpacts();
23  std::list<DamageImpact> &deadlyDamageImpacts();
24  std::list<Voxel*> &deadVoxels();
25  std::list<WorldObjectModification>& worldObjectModifications();
26 
27 
28 protected:
29  std::list<DamageImpact> m_dampedDeadlyDamageImpacts;
30  std::list<DamageImpact> m_deadlyDamageImpacts;
31  std::list<Voxel*> m_deadVoxels;
32  std::map<WorldObject*, WorldObjectModification> m_worldObjectModificationMap;
33  std::list<WorldObjectModification> m_worldObjectModifications;
34 
35  DamageImpact dampDamageImpact(DamageImpact &undamped, float factor);
36 
37  Property<bool> m_playerShipUndestroyable;
38 };
39 
Definition: worldobject.h:43
Definition: damageimpact.h:9
Definition: damager.h:14