Emergency 20 Dokumentation  4.2.0
SimpleDamageComponent.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
15 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
37  {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Public definitions ]
42  //[-------------------------------------------------------]
43  public:
44  static const uint32 COMPONENT_ID;
45 
46 
47  //[-------------------------------------------------------]
48  //[ Public methods ]
49  //[-------------------------------------------------------]
50  public:
58  inline explicit SimpleDamageComponent(qsf::Prototype* prototype);
59 
64  inline virtual ~SimpleDamageComponent();
65 
66  void hideParticleChildrenAtMapSave();
67 
68  //[-------------------------------------------------------]
69  //[ Damage data getter/setter ]
70  //[-------------------------------------------------------]
71  inline const qsf::AssetProxy& getIntactMesh() const;
72  inline void setIntactMesh(const qsf::AssetProxy& mesh);
73 
74  inline const qsf::AssetProxy& getDamagedMesh() const;
75  inline void setDamagedMesh(const qsf::AssetProxy& mesh);
76 
77  inline const qsf::AssetProxy& getDestroyedMesh() const;
78  inline void setDestroyedMesh(const qsf::AssetProxy& mesh);
79 
80  inline const qsf::AssetProxy& getSmutTexture() const;
81  inline void setSmutTexture(const qsf::AssetProxy& smutTexture);
82 
83  inline const qsf::AssetProxy& getDamageTexture() const;
84  inline void setDamageTexture(const qsf::AssetProxy& damageTexture);
85 
86  inline SimpleDamageData::EntityIdArrayInterface& getDamageLevel1Particles();
87  inline SimpleDamageData::EntityIdArrayInterface& getDamageLevel2Particles();
88  inline SimpleDamageData::EntityIdArrayInterface& getDestroyedParticles();
89 
90 
91  //[-------------------------------------------------------]
92  //[ Public virtual qsf::Component methods ]
93  //[-------------------------------------------------------]
94  public:
95  virtual void serialize(qsf::BinarySerializer& serializer) override;
96 
97 
98  //[-------------------------------------------------------]
99  //[ Protected methods ]
100  //[-------------------------------------------------------]
101  protected:
102  void applyCurrentMesh();
103  const qsf::AssetProxy* getCurrentMesh() const;
104 
105 
106  //[-------------------------------------------------------]
107  //[ Protected member ]
108  //[-------------------------------------------------------]
109  protected:
111 
112 
113  //[-------------------------------------------------------]
114  //[ CAMP reflection system ]
115  //[-------------------------------------------------------]
116  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
117 
118 
119  };
120 
121 
122 //[-------------------------------------------------------]
123 //[ Namespace ]
124 //[-------------------------------------------------------]
125 } // em5
126 
127 
128 //[-------------------------------------------------------]
129 //[ Implementation ]
130 //[-------------------------------------------------------]
132 
133 
134 //[-------------------------------------------------------]
135 //[ CAMP reflection system ]
136 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
EMERGENCY 5 simple damage component class.
Definition: SimpleDamageComponent.h:36
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Asset proxy class.
Definition: AssetProxy.h:57
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
EMERGENCY 5 damage component class.
Definition: DamageComponent.h:49
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
Prototype class.
Definition: Prototype.h:100
static const uint32 COMPONENT_ID
"em5::SimpleDamageComponent" unique component ID
Definition: SimpleDamageComponent.h:44
SimpleDamageData mDamageData
Simple damage data, we are responsible for deleting.
Definition: SimpleDamageComponent.h:110
EMERGENCY 5 simple damage data class: Contains data for destruction.
Definition: SimpleDamageData.h:40
Binary serializer class.
Definition: BinarySerializer.h:35