Emergency 20 Dokumentation  4.2.0
MissingPersonEventFactory.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  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public methods ]
53  //[-------------------------------------------------------]
54  public:
60 
65  virtual ~MissingPersonEventFactory();
66 
67  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(IsVictimDeadPercent, float, mIsVictimDeadPercent)
68  QSF_DEFINE_SIMPLE_GETTER_AND_SETTER(UseOnlyWaterVictimPercent, float, mUseOnlyWaterVictimPercent)
69 
70 
71  //[-------------------------------------------------------]
72  //[ Public virtual em5::FreeplayEventFactory methods ]
73  //[-------------------------------------------------------]
74  public:
75  virtual FreeplayEvent* tryTriggerEvent() override;
76 
77 
78  //[-------------------------------------------------------]
79  //[ Private methods ]
80  //[-------------------------------------------------------]
81  private:
82  qsf::Entity* findSpawnPoint(bool useOnlyWaterVictim) const;
83  qsf::Entity* createCandidate(const qsf::Entity& spawnPointEntity) const;
84  bool checkSpawnPoint(qsf::Entity& targetEntity, bool useOnlyWaterVictim) const;
85  bool checkIfNeededUnitsAreAvailable(bool isVictimDead) const;
86 
87  // Return the ID of the connected DogSearchPoint or qsf::getUninitialized<unit64>
88  uint64 findDogSearchPointEntityFromSpawn(qsf::Entity& spawnPoolEntity) const;
89 
90 
91  //[-------------------------------------------------------]
92  //[ Private data ]
93  //[-------------------------------------------------------]
94  private:
95  float mIsVictimDeadPercent;
96  float mUseOnlyWaterVictimPercent;
97 
98 
99  //[-------------------------------------------------------]
100  //[ CAMP reflection system ]
101  //[-------------------------------------------------------]
102  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
103 
104 
105  };
106 
107 
108 //[-------------------------------------------------------]
109 //[ Namespace ]
110 //[-------------------------------------------------------]
111 } // em5
112 
113 
114 //[-------------------------------------------------------]
115 //[ CAMP reflection system ]
116 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Entity class.
Definition: Entity.h:46
#define EM5_API_EXPORT
Definition: Export.h:28
EMERGENCY 5 freeplay event factory for "missing person".
Definition: MissingPersonEventFactory.h:47
uint64_t uint64
Definition: PlatformTypes.h:184
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