Emergency 20 Dokumentation  4.2.0
ComplexFireEventFactory.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 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace qsf
22 {
23  class Entity;
24 }
25 
26 
27 //[-------------------------------------------------------]
28 //[ Namespace ]
29 //[-------------------------------------------------------]
30 namespace em5
31 {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Classes ]
36  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public methods ]
47  //[-------------------------------------------------------]
48  public:
54 
59  virtual ~ComplexFireEventFactory();
60 
61  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(PersonDamageChance, float, mPersonDamageChance)
62  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(PersonMissingChance, float, mPersonMissingChance)
63  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(DifficultyTags, const std::string&, mDifficultyTags)
64 
65 
66  //[-------------------------------------------------------]
67  //[ Public virtual em5::FreeplayEventFactory methods ]
68  //[-------------------------------------------------------]
69  public:
70  virtual FreeplayEvent* tryTriggerEvent() override;
71 
72 
73  //[-------------------------------------------------------]
74  //[ Private methods ]
75  //[-------------------------------------------------------]
76  private:
77  qsf::Entity* getMetaEntity() const;
78  bool checkEntity(qsf::Entity& entity) const;
79  bool checkPersonSpawnEntity(qsf::Entity& entity) const;
80 
81 
82  //[-------------------------------------------------------]
83  //[ Private data ]
84  //[-------------------------------------------------------]
85  private:
86  float mPersonDamageChance;
87  float mPersonMissingChance;
88  std::string mDifficultyTags;
89 
90 
91  //[-------------------------------------------------------]
92  //[ CAMP reflection system ]
93  //[-------------------------------------------------------]
94  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
95 
96 
97  };
98 
99 
100 //[-------------------------------------------------------]
101 //[ Namespace ]
102 //[-------------------------------------------------------]
103 } // em5
104 
105 
106 //[-------------------------------------------------------]
107 //[ CAMP reflection system ]
108 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
EMERGENCY 5 freeplay event factory for "complex fire event".
Definition: ComplexFireEventFactory.h:41
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: PickupPersonByParamedicAction.h:21
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
EMERGENCY 5 freeplay event factory base class.
Definition: FreeplayEventFactory.h:56
#define QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(name, type, variable)
Definition: PropertyHelper.h:16
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66