Emergency 20 Dokumentation  4.2.0
SimpleDamageData.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 //[-------------------------------------------------------]
14 
15 
16 //[-------------------------------------------------------]
17 //[ Forward declarations ]
18 //[-------------------------------------------------------]
19 namespace qsf
20 {
21  class BinarySerializer;
22  class BasePrototypeManager;
23 }
24 
25 
26 //[-------------------------------------------------------]
27 //[ Namespace ]
28 //[-------------------------------------------------------]
29 namespace em5
30 {
31 
32 
33  //[-------------------------------------------------------]
34  //[ Classes ]
35  //[-------------------------------------------------------]
41  {
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
52  inline explicit SimpleDamageData();
53 
58  inline virtual ~SimpleDamageData();
59 
60  inline const qsf::AssetProxy& getIntactMesh() const;
61  inline void setIntactMesh(const qsf::AssetProxy& mesh);
62 
63  inline const qsf::AssetProxy& getDamagedMesh() const;
64  inline void setDamagedMesh(const qsf::AssetProxy& mesh);
65 
66  inline const qsf::AssetProxy& getDestroyedMesh() const;
67  inline void setDestroyedMesh(const qsf::AssetProxy& mesh);
68 
69  inline const qsf::AssetProxy& getSmutTexture() const;
70  inline void setSmutTexture(const qsf::AssetProxy& smutTexture);
71 
72  inline const qsf::AssetProxy& getDamageTexture() const;
73  inline void setDamageTexture(const qsf::AssetProxy& damageTexture);
74 
76 
77  void serialize(qsf::BinarySerializer& serializer);
78 
79 
80  //[-------------------------------------------------------]
81  //[ Private definitions ]
82  //[-------------------------------------------------------]
83  private:
84  typedef std::vector<uint64> EntityIdArray;
85 
86 
87  //[-------------------------------------------------------]
88  //[ Private data ]
89  //[-------------------------------------------------------]
90  private:
91  // Meshes
92  qsf::AssetProxy mIntactMesh;
93  qsf::AssetProxy mDamagedMesh;
94  qsf::AssetProxy mDestroyedMesh;
95 
96  // Textures
97  qsf::AssetProxy mSmutTexture;
98  qsf::AssetProxy mDamageTexture;
99 
100  // Particles
101  EntityIdArray mDamagedLevel1ParticleIds;
102  EntityIdArray mDamagedLevel2ParticleIds;
103  EntityIdArray mDamagedLevel3ParticleIds;
104  EntityIdArray mDestroyedParticleIds;
105 
106 
107  //[-------------------------------------------------------]
108  //[ CAMP reflection system ]
109  //[-------------------------------------------------------]
110  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
111 
112  public:
113  QSF_CAMP_ARRAY_INTERFACE_CLASS_WITH_VARIABLE(EntityIdArrayInterface, SimpleDamageData, std::vector<uint64>, uint64);
114  EntityIdArrayInterface DamagedLevel1Particles;
115  EntityIdArrayInterface DamagedLevel2Particles;
116  EntityIdArrayInterface DamagedLevel3Particles;
117  EntityIdArrayInterface DestroyedParticles;
118 
119 
120  };
121 
122 
123 //[-------------------------------------------------------]
124 //[ Namespace ]
125 //[-------------------------------------------------------]
126 } // em5
127 
128 
129 //[-------------------------------------------------------]
130 //[ Implementation ]
131 //[-------------------------------------------------------]
133 
134 
135 //[-------------------------------------------------------]
136 //[ CAMP reflection system ]
137 //[-------------------------------------------------------]
139 QSF_CAMP_ARRAY_MAPPER_DEFINITION(em5::SimpleDamageData::EntityIdArrayInterface)
void setDamagedMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:49
Definition: ActionPriority.h:13
SimpleDamageData()
Constructor.
Definition: SimpleDamageData-inl.h:20
void setDamageTexture(const qsf::AssetProxy &damageTexture)
Definition: SimpleDamageData-inl.h:79
void setIntactMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:39
const qsf::AssetProxy & getDamagedMesh() const
Definition: SimpleDamageData-inl.h:44
const qsf::AssetProxy & getDamageTexture() const
Definition: SimpleDamageData-inl.h:74
#define QSF_CAMP_ARRAY_INTERFACE_CLASS_WITH_VARIABLE(interfaceClassName, ownerType, variableType, elementType)
Definition: CampClass.h:241
uint64_t uint64
Definition: PlatformTypes.h:184
const qsf::AssetProxy & getDestroyedMesh() const
Definition: SimpleDamageData-inl.h:54
const qsf::AssetProxy & getIntactMesh() const
Definition: SimpleDamageData-inl.h:34
Definition: PickupPersonByParamedicAction.h:21
QSF_CAMP_ARRAY_MAPPER_DEFINITION(qsf::ai::TrafficLightTimerComponent::ManagedTrafficLightList)
Asset proxy class.
Definition: AssetProxy.h:57
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
const qsf::AssetProxy & getSmutTexture() const
Definition: SimpleDamageData-inl.h:64
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
void setDestroyedMesh(const qsf::AssetProxy &mesh)
Definition: SimpleDamageData-inl.h:59
virtual ~SimpleDamageData()
Destructor.
Definition: SimpleDamageData-inl.h:29
void hideParticleChildrenAtMapSave(qsf::BasePrototypeManager &prototypeManager)
void serialize(qsf::BinarySerializer &serializer)
Base class for prototype managers (including map)
Definition: BasePrototypeManager.h:42
EMERGENCY 5 simple damage data class: Contains data for destruction.
Definition: SimpleDamageData.h:40
Binary serializer class.
Definition: BinarySerializer.h:35
void setSmutTexture(const qsf::AssetProxy &smutTexture)
Definition: SimpleDamageData-inl.h:69