Emergency 20 Dokumentation  4.2.0
FireParticleOptionsComponent-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Includes ]
6 //[-------------------------------------------------------]
8 
9 
10 //[-------------------------------------------------------]
11 //[ Namespace ]
12 //[-------------------------------------------------------]
13 namespace em5
14 {
15 
16 
17  //[-------------------------------------------------------]
18  //[ Public methods ]
19  //[-------------------------------------------------------]
21  qsf::Component(prototype),
22  mShowOnLargeFireSate(false),
23  mFireLightEntityId(qsf::getUninitialized<uint64>())
24  {
25  // Initial for all damage level the particle will be shown, but not for explosions
26  mDamageLevelFlags.set(DAMAGE_INTACT);
27  mDamageLevelFlags.set(DAMAGE_LEVEL1);
28  mDamageLevelFlags.set(DAMAGE_LEVEL2);
29  mDamageLevelFlags.set(DAMAGE_LEVEL3);
30  }
31 
33  {
34  // Nothing to do in here
35  }
36 
38  {
39  return mDamageLevelFlags.isSet(DAMAGE_INTACT);
40  }
41 
43  {
44  mDamageLevelFlags.set(DAMAGE_INTACT, show);
45  }
46 
48  {
49  return mDamageLevelFlags.isSet(DAMAGE_LEVEL1);
50  }
51 
53  {
54  mDamageLevelFlags.set(DAMAGE_LEVEL1, show);
55  }
56 
58  {
59  return mDamageLevelFlags.isSet(DAMAGE_LEVEL2);
60  }
61 
63  {
64  mDamageLevelFlags.set(DAMAGE_LEVEL2, show);
65  }
66 
68  {
69  return mDamageLevelFlags.isSet(DAMAGE_LEVEL3);
70  }
71 
73  {
74  mDamageLevelFlags.set(DAMAGE_LEVEL3, show);
75  }
76 
78  {
79  return mDamageLevelFlags.isSet(DAMAGE_EXPLOSION);
80  }
81 
83  {
84  mDamageLevelFlags.set(DAMAGE_EXPLOSION, show);
85  }
86 
88  {
89  return mShowOnLargeFireSate;
90  }
91 
93  {
94  mShowOnLargeFireSate = show;
95  }
96 
98  {
99  return mFireLightEntityId;
100  }
101 
103  {
104  mFireLightEntityId = fireLightEntity;
105  }
106 
107 
108 //[-------------------------------------------------------]
109 //[ Namespace ]
110 //[-------------------------------------------------------]
111 } // em5
Definition: ActionPriority.h:13
void setShowOnLargeFireState(bool show)
Set if the particle should be shown when the fire state is large (on false it will shown on fire stat...
Definition: FireParticleOptionsComponent-inl.h:92
void set(ENUM flag)
Set a single flag.
Definition: EnumBitmask.h:187
bool getShowOnLargeFireState() const
Return "true" if the particle should be shown when the fire state is large -> false when for the smal...
Definition: FireParticleOptionsComponent-inl.h:87
bool getShowOnDamageLevel1() const
Return "true" if the particle should be shown when damage level 1 is reached.
Definition: FireParticleOptionsComponent-inl.h:47
uint64_t uint64
Definition: PlatformTypes.h:184
void setFireLightEntityId(uint64 fireLightEntity)
Set the entity ID of the fire light to be used.
Definition: FireParticleOptionsComponent-inl.h:102
void setShowOnExplosion(bool show)
Set if the particle should be shown for object explosion.
Definition: FireParticleOptionsComponent-inl.h:82
Definition: PickupPersonByParamedicAction.h:21
T getUninitialized()
Definition: GetUninitialized.h:38
uint64 getFireLightEntityId() const
Returns the entity ID of the fire light.
Definition: FireParticleOptionsComponent-inl.h:97
void setShowOnDamageLevel1(bool show)
Set if the particle should be shown when damage level 1 is reached.
Definition: FireParticleOptionsComponent-inl.h:52
bool getShowOnExplosion() const
Return "true" if the particle should be shown for object explosion.
Definition: FireParticleOptionsComponent-inl.h:77
bool getShowOnDamageLevel2() const
Return "true" if the particle should be shown when damage level 2 is reached.
Definition: FireParticleOptionsComponent-inl.h:57
Prototype class.
Definition: Prototype.h:100
bool isSet(ENUM flag) const
Check whether a certain flag is set.
Definition: EnumBitmask.h:118
void setShowOnDamageLevel2(bool show)
Set if the particle should be shown when damage level 2 is reached.
Definition: FireParticleOptionsComponent-inl.h:62
bool getShowOnDamageLevel3() const
Return "true" if the particle should be shown when damage level 3 is reached.
Definition: FireParticleOptionsComponent-inl.h:67
void setShowOnIntact(bool show)
Set if the particle should be shown when damage level intact is reached.
Definition: FireParticleOptionsComponent-inl.h:42
bool getShowOnIntact() const
Return "true" if the particle should be shown when damage level intact is reached.
Definition: FireParticleOptionsComponent-inl.h:37
void setShowOnDamageLevel3(bool show)
Set if the particle should be shown when damage level 3 is reached.
Definition: FireParticleOptionsComponent-inl.h:72
virtual ~FireParticleOptionsComponent()
Destructor.
Definition: FireParticleOptionsComponent-inl.h:32
FireParticleOptionsComponent(qsf::Prototype *prototype)
Constructor.
Definition: FireParticleOptionsComponent-inl.h:20